~ubuntu-branches/ubuntu/quantal/mplayer2/quantal-proposed

« back to all changes in this revision

Viewing changes to libao2/audio_out.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2012-01-12 22:59:30 UTC
  • mfrom: (5.1.8 sid)
  • Revision ID: package-import@ubuntu.com-20120112225930-jsg10o7na7nk73w5
Tags: 2.0-426-gc32b3ed-2
* Upload to unstable
* don't build-depend on libcdparanoia-dev on the hurd

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
extern const struct ao_driver audio_out_oss;
36
36
extern const struct ao_driver audio_out_coreaudio;
37
37
extern const struct ao_driver audio_out_arts;
 
38
extern const struct ao_driver audio_out_rsound;
38
39
extern const struct ao_driver audio_out_esd;
39
40
extern const struct ao_driver audio_out_pulse;
40
41
extern const struct ao_driver audio_out_jack;
120
121
    &audio_out_null,
121
122
    // should not be auto-selected:
122
123
    &audio_out_pcm,
 
124
#ifdef CONFIG_RSOUND
 
125
    &audio_out_rsound,
 
126
#endif
123
127
    NULL
124
128
};
125
129
 
217
221
 
218
222
void ao_uninit(struct ao *ao, bool cut_audio)
219
223
{
 
224
    assert(ao->buffer.len >= ao->buffer_playable_size);
 
225
    ao->buffer.len = ao->buffer_playable_size;
220
226
    if (ao->initialized)
221
227
        ao->driver->uninit(ao, cut_audio);
 
228
    if (!cut_audio && ao->buffer.len)
 
229
        mp_msg(MSGT_AO, MSGL_WARN, "Audio output truncated at end.\n");
222
230
    talloc_free(ao);
223
231
}
224
232
 
250
258
 
251
259
void ao_reset(struct ao *ao)
252
260
{
 
261
    ao->buffer.len = 0;
 
262
    ao->buffer_playable_size = 0;
253
263
    if (ao->driver->reset)
254
264
        ao->driver->reset(ao);
255
265
}