| 1 |
/* |
| 2 |
audio: audio output interface |
| 3 |
|
| 4 |
This is what is left after separating out libout123. |
| 5 |
|
| 6 |
copyright ?-2015 by the mpg123 project - free software under the terms of the LGPL 2.1 |
| 7 |
see COPYING and AUTHORS files in distribution or http://mpg123.org |
| 8 |
initially written by Michael Hipp |
| 9 |
*/ |
| 10 |
|
| 11 |
/* |
| 12 |
* Audio 'LIB' defines |
| 13 |
*/ |
| 14 |
|
| 15 |
|
| 16 |
#ifndef _MPG123_AUDIO_H_ |
| 17 |
#define _MPG123_AUDIO_H_ |
| 18 |
|
| 19 |
#include "compat/compat.h" |
| 20 |
#include "mpg123.h" |
| 21 |
#include "out123.h" |
| 22 |
|
| 23 |
#define pitch_rate(rate) (param.pitch == 0 ? (rate) : (long) ((param.pitch+1.0)*(rate))) |
| 24 |
#define bpitch_rate(rate) (param.pitch == 0 ? (rate) : (long) ((rate)/(param.pitch+1.0))) |
| 25 |
|
| 26 |
|
| 27 |
void audio_cleanup(void); |
| 28 |
int audio_setup(out123_handle *ao, mpg123_handle *mh); |
| 29 |
int audio_prepare( out123_handle *ao, mpg123_handle *mh |
| 30 |
, long rate, int channels, int encoding ); |
| 31 |
size_t audio_play(out123_handle *ao, void *buffer, size_t bytes); |
| 32 |
|
| 33 |
mpg123_string* audio_enclist(void); |
| 34 |
void print_capabilities(out123_handle *ao, mpg123_handle *mh); |
| 35 |
|
| 36 |
/* |
| 37 |
Twiddle audio output rate to yield speedup/down (pitch) effect. |
| 38 |
The actually achieved pitch value is stored in param.pitch. |
| 39 |
Returns 1 if pitch setting succeeded, 0 otherwise. |
| 40 |
*/ |
| 41 |
int set_pitch(mpg123_handle *fr, out123_handle *ao, double new_pitch); |
| 42 |
// Enable/disable software mute state. |
| 43 |
int set_mute(out123_handle *ao, int mutestate); |
| 44 |
|
| 45 |
#endif |
| 46 |
|