Top |
void | playback-data | Run First |
void | playback-get-delay | Run First |
void | playback-start | Run First |
void | playback-stop | Run First |
SpicePlaybackChannel class handles an audio playback stream. The audio data is received via “playback-data” signal, and is controlled by the guest with “playback-stop” and “playback-start” signal events.
Note: You may be interested to let the SpiceAudio class play and record audio channels for your application.
void spice_playback_channel_set_delay (SpicePlaybackChannel *channel
,guint32 delay_ms
);
Adjust the multimedia time according to the delay.
struct SpicePlaybackChannel;
The SpicePlaybackChannel struct is opaque and should not be accessed directly.
struct SpicePlaybackChannelClass { SpiceChannelClass parent_class; /* signals */ void (*playback_start)(SpicePlaybackChannel *channel, gint format, gint channels, gint freq); void (*playback_data)(SpicePlaybackChannel *channel, gpointer *data, gint size); void (*playback_stop)(SpicePlaybackChannel *channel); };
Class structure for SpicePlaybackChannel.
Signal class handler for the “playback-start” signal. |
||
Signal class handler for the “playback-data” signal. |
||
Signal class handler for the “playback-stop” signal. |
“min-latency”
property“min-latency” guint
Playback min buffer size (ms).
Flags: Read / Write
Default value: 200
“nchannels”
property“nchannels” guint
Number of Channels.
Flags: Read / Write
Allowed values: <= 255
Default value: 2
“playback-data”
signalvoid user_function (SpicePlaybackChannel *channel, gpointer data, gint data_size, gpointer user_data)
Provide audio data to be played.
channel |
the SpicePlaybackChannel that emitted the signal |
|
data |
pointer to audio data |
|
data_size |
size in byte of |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
“playback-get-delay”
signalvoid user_function (SpicePlaybackChannel *channel, gpointer user_data)
Notify when the current playback delay is requested
channel |
the SpicePlaybackChannel that emitted the signal |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
“playback-start”
signalvoid user_function (SpicePlaybackChannel *channel, gint format, gint channels, gint rate, gpointer user_data)
Notify when the playback should start, and provide audio format characteristics.
channel |
the SpicePlaybackChannel that emitted the signal |
|
format |
a SPICE_AUDIO_FMT |
|
channels |
number of channels |
|
rate |
audio rate |
|
latency |
minimum playback latency in ms |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
“playback-stop”
signalvoid user_function (SpicePlaybackChannel *channel, gpointer user_data)
Notify when the playback should stop.
channel |
the SpicePlaybackChannel that emitted the signal |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First