pcm_{mix,volume}: pass only sample_format to pcm_mix()
The other audio_format attributes are not used.
This commit is contained in:
@@ -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);
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user