foobar2000 SDK  2015-08-03
vis.h
Go to the documentation of this file.
1 class NOVTABLE visualisation_stream : public service_base {
4 public:
6  virtual bool get_absolute_time(double & p_value) = 0;
7 
10  virtual bool get_chunk_absolute(audio_chunk & p_chunk,double p_offset,double p_requested_length) = 0;
16  virtual bool get_spectrum_absolute(audio_chunk & p_chunk,double p_offset,unsigned p_fft_size) = 0;
17 
20  virtual void make_fake_chunk_absolute(audio_chunk & p_chunk,double p_offset,double p_requested_length) = 0;
23  virtual void make_fake_spectrum_absolute(audio_chunk & p_chunk,double p_offset,unsigned p_fft_size) = 0;
24 
25  FB2K_MAKE_SERVICE_INTERFACE(visualisation_stream,service_base);
26 };
27 
30 public:
31  virtual void request_backlog(double p_time) = 0;
32  virtual void set_channel_mode(t_uint32 p_mode) = 0;
33 
34  enum {
35  channel_mode_default = 0,
39  };
40 
42 };
43 
46 public:
47  virtual void chunk_to_spectrum(audio_chunk const & chunk, audio_chunk & spectrum, double centerOffset) = 0;
48 
50 };
51 
55 class NOVTABLE visualisation_manager : public service_base {
56 public:
61  virtual void create_stream(service_ptr_t<visualisation_stream> & p_out,unsigned p_flags) = 0;
62 
63  enum {
66  KStreamFlagNewFFT = 1 << 0,
67  };
68 
69 
71  template<typename t_streamptr>
72  void create_stream(t_streamptr & out, unsigned flags) {
73  visualisation_stream::ptr temp; create_stream(temp, flags);
74  if (!temp->service_query_t(out)) throw exception_service_extension_not_found();
75  }
76 
77  FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT(visualisation_manager);
78 };
This class provides abstraction for retrieving visualisation data. Instances of visualisation_stream ...
Definition: vis.h:3
Interface to container of a chunk of audio data. See audio_chunk_impl for an implementation.
Definition: audio_chunk.h:5
New in 0.9.5.
Definition: vis.h:29
FB2K_MAKE_SERVICE_INTERFACE(visualisation_stream_v2, visualisation_stream)
Base class for all service classes. Provides interfaces for reference counter and querying for differ...
Definition: service.h:333
void create_stream(t_streamptr &out, unsigned flags)
Wrapper around non-template create_stream(); retrieves one of newer visualisation_stream_* interfaces...
Definition: vis.h:72
Entrypoint service for visualisation processing; use this to create visualisation_stream objects that...
Definition: vis.h:55
Autopointer class to be used with all services. Manages reference counter calls behind-the-scenes.
Definition: service.h:55
New in 0.9.5.2.
Definition: vis.h:45
uint32_t t_uint32
Definition: int_types.h:5
FB2K_MAKE_SERVICE_INTERFACE(visualisation_stream, service_base)