aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-07-31 00:57:52 +0200
committerMax Kellermann <max@duempel.org>2013-07-31 00:57:52 +0200
commit44621f73269d3d269e365dee9cc5a4b5ba70d404 (patch)
tree08ca0f3c50c46d7f44b94b2a2655b292d7c10ffa /src
parent8ead8f7ea69ab54027cdd11d6defce26f4c6ceb5 (diff)
downloadmpd-44621f73269d3d269e365dee9cc5a4b5ba70d404.tar.gz
mpd-44621f73269d3d269e365dee9cc5a4b5ba70d404.tar.xz
mpd-44621f73269d3d269e365dee9cc5a4b5ba70d404.zip
output/winmm: adapt to PcmBuffer API changes
Diffstat (limited to 'src')
-rw-r--r--src/output/WinmmOutputPlugin.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/output/WinmmOutputPlugin.cxx b/src/output/WinmmOutputPlugin.cxx
index 34593b62f..2418731a0 100644
--- a/src/output/WinmmOutputPlugin.cxx
+++ b/src/output/WinmmOutputPlugin.cxx
@@ -20,7 +20,7 @@
#include "config.h"
#include "WinmmOutputPlugin.hxx"
#include "OutputAPI.hxx"
-#include "pcm/pcm_buffer.h"
+#include "pcm/PcmBuffer.hxx"
#include "MixerList.hxx"
#include <stdlib.h>
@@ -30,7 +30,7 @@
#define G_LOG_DOMAIN "winmm_output"
struct WinmmBuffer {
- struct pcm_buffer buffer;
+ PcmBuffer buffer;
WAVEHDR hdr;
};
@@ -190,7 +190,6 @@ winmm_output_open(struct audio_output *ao, struct audio_format *audio_format,
}
for (unsigned i = 0; i < G_N_ELEMENTS(wo->buffers); ++i) {
- pcm_buffer_init(&wo->buffers[i].buffer);
memset(&wo->buffers[i].hdr, 0, sizeof(wo->buffers[i].hdr));
}
@@ -205,7 +204,7 @@ winmm_output_close(struct audio_output *ao)
WinmmOutput *wo = (WinmmOutput *)ao;
for (unsigned i = 0; i < G_N_ELEMENTS(wo->buffers); ++i)
- pcm_buffer_deinit(&wo->buffers[i].buffer);
+ wo->buffers[i].buffer.Clear();
waveOutClose(wo->handle);
@@ -220,7 +219,7 @@ winmm_set_buffer(WinmmOutput *wo, WinmmBuffer *buffer,
const void *data, size_t size,
GError **error_r)
{
- void *dest = pcm_buffer_get(&buffer->buffer, size);
+ void *dest = buffer->buffer.Get(size);
assert(dest != nullptr);
memcpy(dest, data, size);