foobar2000 SDK
2015-08-03
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
foobar2000
SDK
resampler.h
Go to the documentation of this file.
1
class
NOVTABLE
resampler_entry
:
public
dsp_entry
2
{
3
public
:
4
virtual
bool
is_conversion_supported(
unsigned
p_srate_from,
unsigned
p_srate_to) = 0;
5
virtual
bool
create_preset(
dsp_preset
& p_out,
unsigned
p_target_srate,
float
p_qualityscale) = 0;
//p_qualityscale is 0...1
6
virtual
float
get_priority() = 0;
//value is 0...1, where high-quality (SSRC etc) has 1
7
8
static
bool
g_get_interface
(
service_ptr_t<resampler_entry>
& p_out,
unsigned
p_srate_from,
unsigned
p_srate_to);
9
static
bool
g_create(
service_ptr_t<dsp>
& p_out,
unsigned
p_srate_from,
unsigned
p_srate_to,
float
p_qualityscale);
10
static
bool
g_create_preset(
dsp_preset
& p_out,
unsigned
p_srate_from,
unsigned
p_srate_to,
float
p_qualityscale);
11
12
FB2K_MAKE_SERVICE_INTERFACE(
resampler_entry
,
dsp_entry
);
13
};
14
15
template
<
typename
T>
16
class
resampler_entry_impl_t
:
public
dsp_entry_impl_t
<T,resampler_entry>
17
{
18
public
:
19
bool
is_conversion_supported
(
unsigned
p_srate_from,
unsigned
p_srate_to) {
return
T::g_is_conversion_supported(p_srate_from,p_srate_to);}
20
bool
create_preset
(
dsp_preset
& p_out,
unsigned
p_target_srate,
float
p_qualityscale) {
return
T::g_create_preset(p_out,p_target_srate,p_qualityscale);}
21
float
get_priority
() {
return
T::g_get_priority();}
22
};
23
24
template
<
typename
T>
25
class
resampler_factory_t
:
public
service_factory_single_t
<resampler_entry_impl_t<T> > {};
resampler_entry_impl_t::create_preset
bool create_preset(dsp_preset &p_out, unsigned p_target_srate, float p_qualityscale)
Definition:
resampler.h:20
dsp_entry
Definition:
dsp.h:284
resampler_entry
Definition:
resampler.h:1
dsp_entry_impl_t
Definition:
dsp.h:345
dsp_entry::g_get_interface
static bool g_get_interface(service_ptr_t< dsp_entry > &p_out, const GUID &p_guid)
Definition:
dsp.cpp:290
dsp_preset
Definition:
dsp.h:186
resampler_factory_t
Definition:
resampler.h:25
resampler_entry_impl_t
Definition:
resampler.h:16
service_ptr_t
Autopointer class to be used with all services. Manages reference counter calls behind-the-scenes.
Definition:
service.h:55
resampler_entry_impl_t::get_priority
float get_priority()
Definition:
resampler.h:21
service_factory_single_t
Definition:
service.h:620
resampler_entry_impl_t::is_conversion_supported
bool is_conversion_supported(unsigned p_srate_from, unsigned p_srate_to)
Definition:
resampler.h:19
Generated by
1.8.11