output/sles: use AudioOutputWrapper::Create()
This commit is contained in:
parent
ee6e0e16cb
commit
e660229c40
@ -97,6 +97,8 @@ public:
|
|||||||
|
|
||||||
bool Configure(const ConfigBlock &block, Error &error);
|
bool Configure(const ConfigBlock &block, Error &error);
|
||||||
|
|
||||||
|
static SlesOutput *Create(const ConfigBlock &block, Error &error);
|
||||||
|
|
||||||
bool Open(AudioFormat &audio_format, Error &error);
|
bool Open(AudioFormat &audio_format, Error &error);
|
||||||
void Close();
|
void Close();
|
||||||
|
|
||||||
@ -444,8 +446,8 @@ sles_test_default_device()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static AudioOutput *
|
inline SlesOutput *
|
||||||
sles_output_init(const ConfigBlock &block, Error &error)
|
SlesOutput::Create(const ConfigBlock &block, Error &error)
|
||||||
{
|
{
|
||||||
SlesOutput *sles = new SlesOutput();
|
SlesOutput *sles = new SlesOutput();
|
||||||
|
|
||||||
@ -455,7 +457,7 @@ sles_output_init(const ConfigBlock &block, Error &error)
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
return *sles;
|
return sles;
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef AudioOutputWrapper<SlesOutput> Wrapper;
|
typedef AudioOutputWrapper<SlesOutput> Wrapper;
|
||||||
@ -463,7 +465,7 @@ typedef AudioOutputWrapper<SlesOutput> Wrapper;
|
|||||||
const struct AudioOutputPlugin sles_output_plugin = {
|
const struct AudioOutputPlugin sles_output_plugin = {
|
||||||
"sles",
|
"sles",
|
||||||
sles_test_default_device,
|
sles_test_default_device,
|
||||||
sles_output_init,
|
&Wrapper::Init,
|
||||||
&Wrapper::Finish,
|
&Wrapper::Finish,
|
||||||
nullptr,
|
nullptr,
|
||||||
nullptr,
|
nullptr,
|
||||||
|
Loading…
Reference in New Issue
Block a user