pcm_{mix,volume}: pass only sample_format to pcm_mix()

The other audio_format attributes are not used.
This commit is contained in:
Max Kellermann
2011-10-10 08:11:04 +02:00
parent 572d8d0cc4
commit 0847ca4ec2
11 changed files with 23 additions and 22 deletions

View File

@@ -116,7 +116,7 @@ filter_plugin_by_name(G_GNUC_UNUSED const char *name)
bool
pcm_volume(G_GNUC_UNUSED void *buffer, G_GNUC_UNUSED int length,
G_GNUC_UNUSED const struct audio_format *format,
G_GNUC_UNUSED enum sample_format format,
G_GNUC_UNUSED int volume)
{
assert(false);

View File

@@ -53,7 +53,7 @@ idle_add(G_GNUC_UNUSED unsigned flags)
*/
bool
pcm_volume(G_GNUC_UNUSED void *buffer, G_GNUC_UNUSED int length,
G_GNUC_UNUSED const struct audio_format *format,
G_GNUC_UNUSED enum sample_format format,
G_GNUC_UNUSED int volume)
{
return true;

View File

@@ -57,7 +57,7 @@ idle_add(G_GNUC_UNUSED unsigned flags)
*/
bool
pcm_volume(G_GNUC_UNUSED void *buffer, G_GNUC_UNUSED int length,
G_GNUC_UNUSED const struct audio_format *format,
G_GNUC_UNUSED enum sample_format format,
G_GNUC_UNUSED int volume)
{
return true;

View File

@@ -59,7 +59,7 @@ int main(int argc, char **argv)
audio_format_init(&audio_format, 48000, SAMPLE_FORMAT_S16, 2);
while ((nbytes = read(0, buffer, sizeof(buffer))) > 0) {
if (!pcm_volume(buffer, nbytes, &audio_format,
if (!pcm_volume(buffer, nbytes, audio_format.format,
PCM_VOLUME_1 / 2)) {
g_printerr("pcm_volume() has failed\n");
return 2;