Fix memory leak, re-enable play command (it doesnt work lol)

This commit is contained in:
jacqueline
2023-01-26 15:09:59 +11:00
parent f6dcd845fc
commit 3696512b38
2 changed files with 7 additions and 3 deletions
+5 -1
View File
@@ -21,7 +21,11 @@ namespace audio {
static const std::size_t kSamplesPerChunk = 256;
AudioDecoder::AudioDecoder() : IAudioElement(), stream_info_({}) {}
AudioDecoder::AudioDecoder()
: IAudioElement(),
stream_info_({}),
has_samples_to_send_(false),
needs_more_input_(true) {}
AudioDecoder::~AudioDecoder() {}
+2 -2
View File
@@ -38,11 +38,11 @@ auto AudioPlayback::create(drivers::GpioExpander* expander,
playback->ConnectElements(codec.get(), sink.get());
// Launch!
/*
playback->element_handles_.push_back(StartAudioTask("src", source));
playback->element_handles_.push_back(StartAudioTask("dec", codec));
playback->element_handles_.push_back(StartAudioTask("sink", sink));
*/
playback->input_handle_ = source->InputEventQueue();
return playback;
}