pcm/PcmConvert: eliminate Open() and Close()
Let the constructor and destructor do this. This means that all users have to be converted to allocate PcmConvert dynamically.
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
*/
|
||||
|
||||
#include "ConfigGlue.hxx"
|
||||
#include "pcm/PcmConvert.hxx"
|
||||
#include "lib/chromaprint/DecoderClient.hxx"
|
||||
#include "event/Thread.hxx"
|
||||
#include "decoder/DecoderList.hxx"
|
||||
|
@@ -53,8 +53,7 @@ try {
|
||||
|
||||
const size_t in_frame_size = in_audio_format.GetFrameSize();
|
||||
|
||||
PcmConvert state;
|
||||
state.Open(in_audio_format, out_audio_format);
|
||||
PcmConvert state(in_audio_format, out_audio_format);
|
||||
|
||||
StaticFifoBuffer<uint8_t, 4096> buffer;
|
||||
|
||||
@@ -94,8 +93,6 @@ try {
|
||||
output.size);
|
||||
}
|
||||
|
||||
state.Close();
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
} catch (...) {
|
||||
PrintException(std::current_exception());
|
||||
|
Reference in New Issue
Block a user