audio_format: convert to C++

This commit is contained in:
Max Kellermann
2013-08-03 21:00:50 +02:00
parent 67f591a9ce
commit d1e7b4e381
121 changed files with 1251 additions and 1275 deletions

View File

@@ -202,12 +202,12 @@ vorbis_stream_decode(struct decoder *decoder,
return;
}
struct audio_format audio_format;
if (!audio_format_init_checked(&audio_format, vi->rate,
AudioFormat audio_format;
if (!audio_format_init_checked(audio_format, vi->rate,
#ifdef HAVE_TREMOR
SAMPLE_FORMAT_S16,
SampleFormat::S16,
#else
SAMPLE_FORMAT_FLOAT,
SampleFormat::FLOAT,
#endif
vi->channels, &error)) {
g_warning("%s", error->message);
@@ -219,7 +219,7 @@ vorbis_stream_decode(struct decoder *decoder,
if (total_time < 0)
total_time = 0;
decoder_initialized(decoder, &audio_format, vis.seekable, total_time);
decoder_initialized(decoder, audio_format, vis.seekable, total_time);
enum decoder_command cmd = decoder_get_command(decoder);