mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-08-07 21:03:10 +00:00
sound: Remove code from spice_server_record_get_samples()
The removed code was trying to read data when spice_server_record_get_samples() is called. Since reading of data is event-driven anyway (see snd_event), it's redundant to try again to read more data. This commit removes this code as this will some refactoring easier in the next commits. Based on a patch from Frediano Ziglio <fziglio@redhat.com> Signed-off-by: Christophe Fergeau <cfergeau@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
parent
4bb9c1fe56
commit
cb0e45cd16
@ -1474,15 +1474,6 @@ SPICE_GNUC_VISIBLE uint32_t spice_server_record_get_samples(SpiceRecordInstance
|
||||
|
||||
len = MIN(record_client->write_pos - record_client->read_pos, bufsize);
|
||||
|
||||
if (len < bufsize) {
|
||||
SndChannel *channel = SND_CHANNEL(red_channel_client_get_channel(client->channel_client));
|
||||
snd_receive(client);
|
||||
if (!channel->connection) {
|
||||
return 0;
|
||||
}
|
||||
len = MIN(record_client->write_pos - record_client->read_pos, bufsize);
|
||||
}
|
||||
|
||||
read_pos = record_client->read_pos % RECORD_SAMPLES_SIZE;
|
||||
record_client->read_pos += len;
|
||||
now = MIN(len, RECORD_SAMPLES_SIZE - read_pos);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user