diff options
author | Max Kellermann <max@duempel.org> | 2015-08-06 09:50:02 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2015-08-06 09:50:02 +0200 |
commit | 464744839931b890c440ab0a053cfe4546faf47c (patch) | |
tree | dbe7490bbb5f1dbe092441d16ac36224c50099ab /src/output/plugins | |
parent | 7dfe8418766626c6d6fa0c7c148e8aae4964bc5f (diff) |
output/fifo: use AudioOutputWrapper::Open(),Close()
Diffstat (limited to 'src/output/plugins')
-rw-r--r-- | src/output/plugins/FifoOutputPlugin.cxx | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/src/output/plugins/FifoOutputPlugin.cxx b/src/output/plugins/FifoOutputPlugin.cxx index b8887e6e2..5956b708f 100644 --- a/src/output/plugins/FifoOutputPlugin.cxx +++ b/src/output/plugins/FifoOutputPlugin.cxx @@ -70,6 +70,9 @@ struct FifoOutput { bool OpenFifo(Error &error); void CloseFifo(); + bool Open(AudioFormat &audio_format, Error &error); + void Close(); + unsigned Delay() const; size_t Play(const void *chunk, size_t size, Error &error); void Cancel(); @@ -204,23 +207,17 @@ FifoOutput::Create(const ConfigBlock &block, Error &error) return fd; } -static bool -fifo_output_open(AudioOutput *ao, AudioFormat &audio_format, - gcc_unused Error &error) +bool +FifoOutput::Open(AudioFormat &audio_format, gcc_unused Error &error) { - FifoOutput *fd = (FifoOutput *)ao; - - fd->timer = new Timer(audio_format); - + timer = new Timer(audio_format); return true; } -static void -fifo_output_close(AudioOutput *ao) +void +FifoOutput::Close() { - FifoOutput *fd = (FifoOutput *)ao; - - delete fd->timer; + delete timer; } inline void @@ -287,8 +284,8 @@ const struct AudioOutputPlugin fifo_output_plugin = { &Wrapper::Finish, nullptr, nullptr, - fifo_output_open, - fifo_output_close, + &Wrapper::Open, + &Wrapper::Close, &Wrapper::Delay, nullptr, &Wrapper::Play, |