[Spice-devel] [PATCH v2] Sound: Fix confusing channel/client terminology
Jonathon Jongsma
jjongsma at redhat.com
Thu Jan 5 15:35:31 UTC 2017
Previously, the object we now call SndChannel was named SndWorker, and
the object we now call SndChannelClient was called SndChannel. When
these names were changed, the functions
on_new_(record|playback)_channel() were not updated, so the function
names and the arguments are both a bit confusing now. Update them to
match the new names.
---
Change in v2:
- rebase on master
server/sound.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/server/sound.c b/server/sound.c
index 310ff6e..8d2e4c7 100644
--- a/server/sound.c
+++ b/server/sound.c
@@ -1243,21 +1243,21 @@ static int snd_desired_audio_mode(int playback_compression, int frequency,
return SPICE_AUDIO_DATA_MODE_RAW;
}
-static void on_new_playback_channel(SndChannel *channel, SndChannelClient *snd_channel)
+static void on_new_playback_channel_client(SndChannel *channel, SndChannelClient *client)
{
RedsState *reds = red_channel_get_server(RED_CHANNEL(channel));
- spice_assert(snd_channel);
+ spice_assert(client);
- channel->connection = snd_channel;
- snd_set_command(snd_channel, SND_PLAYBACK_MODE_MASK);
- if (snd_channel->active) {
- snd_set_command(snd_channel, SND_CTRL_MASK);
+ channel->connection = client;
+ snd_set_command(client, SND_PLAYBACK_MODE_MASK);
+ if (client->active) {
+ snd_set_command(client, SND_CTRL_MASK);
}
if (channel->volume.volume_nchannels) {
- snd_set_command(snd_channel, SND_VOLUME_MASK);
+ snd_set_command(client, SND_VOLUME_MASK);
}
- if (snd_channel->active) {
+ if (client->active) {
reds_disable_mm_time(reds);
}
}
@@ -1505,16 +1505,16 @@ SPICE_GNUC_VISIBLE void spice_server_set_record_rate(SpiceRecordInstance *sin, u
snd_set_rate(&sin->st->channel, frequency, SPICE_RECORD_CAP_OPUS);
}
-static void on_new_record_channel(SndChannel *channel, SndChannelClient *snd_channel)
+static void on_new_record_channel_client(SndChannel *channel, SndChannelClient *client)
{
- spice_assert(snd_channel);
+ spice_assert(client);
- channel->connection = snd_channel ;
+ channel->connection = client ;
if (channel->volume.volume_nchannels) {
- snd_set_command(snd_channel, SND_VOLUME_MASK);
+ snd_set_command(client, SND_VOLUME_MASK);
}
- if (snd_channel->active) {
- snd_set_command(snd_channel, SND_CTRL_MASK);
+ if (client->active) {
+ snd_set_command(client, SND_CTRL_MASK);
}
}
--
2.9.3
More information about the Spice-devel
mailing list