diff options
Diffstat (limited to 'server/snd_worker.c')
-rw-r--r-- | server/snd_worker.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/snd_worker.c b/server/snd_worker.c index 3efb8351..51ffbb54 100644 --- a/server/snd_worker.c +++ b/server/snd_worker.c @@ -1296,6 +1296,7 @@ static uint32_t snd_select_best_mode(RedChannelClient *rcc) /* return 0 on success */ static int snd_create_encoder(PlaybackChannel *playback_channel) { + SpicePlaybackState *st = SPICE_CONTAINEROF(playback_channel->base.worker, SpicePlaybackState, worker); SndChannel *channel = (SndChannel *)playback_channel; CELTMode *celt_mode = NULL; CELTEncoder *celt_encoder = NULL; @@ -1308,6 +1309,7 @@ static int snd_create_encoder(PlaybackChannel *playback_channel) if (mode == SPICE_AUDIO_DATA_MODE_CELT_0_5_1) { channel->frame_size = CELT_FRAME_SIZE; + spice_assert (SPICE_INTERFACE_PLAYBACK_FREQ == st->sample_rate); if (!(celt_mode = celt051_mode_create(SPICE_INTERFACE_PLAYBACK_FREQ, SPICE_INTERFACE_PLAYBACK_CHAN, channel->frame_size, &celt_error))) { @@ -1324,7 +1326,7 @@ static int snd_create_encoder(PlaybackChannel *playback_channel) } else if (mode == SPICE_AUDIO_DATA_MODE_OPUS) { #ifdef HAVE_OPUS channel->frame_size = OPUS_FRAME_SIZE; - //assert (SPICE_INTERFACE_PLAYBACK_OPUS_FREQ == st->sample_rate); + spice_assert (SPICE_INTERFACE_PLAYBACK_OPUS_FREQ == st->sample_rate); if (!(opus_encoder = opus_encoder_create(SPICE_INTERFACE_PLAYBACK_OPUS_FREQ, SPICE_INTERFACE_PLAYBACK_CHAN, OPUS_APPLICATION_RESTRICTED_LOWDELAY, |