[PATCH v3] Sound: Fix confusing channel/client terminology

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
---

Changes in v3:
 - compiles without error

 server/sound.c | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/server/sound.c b/server/sound.c
index 310ff6e..86bf3fc 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);
     }
 }
@@ -1327,7 +1327,7 @@ static void snd_set_playback_peer(RedChannel *red_channel, RedClient *client, Re
     }
 
     if (!red_client_during_migrate_at_target(client)) {
-        on_new_playback_channel(channel, SND_CHANNEL_CLIENT(playback_client));
+        on_new_playback_channel_client(channel, SND_CHANNEL_CLIENT(playback_client));
     }
 
     if (channel->active) {
@@ -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);
     }
 }
 
@@ -1550,7 +1550,7 @@ static void snd_set_record_peer(RedChannel *red_channel, RedClient *client, Reds
 
     record_client->mode = SPICE_AUDIO_DATA_MODE_RAW;
 
-    on_new_record_channel(channel, SND_CHANNEL_CLIENT(record_client));
+    on_new_record_channel_client(channel, SND_CHANNEL_CLIENT(record_client));
     if (channel->active) {
         snd_record_start(channel);
     }
-- 
2.9.3

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]