audio: added audio_output_config_count()
audio_output_config_count() returns the number of audio outputs in the configuration file. It is only used by initAudioDriver(). The public function audio_output_count() now returns audioOutputArraySize.
This commit is contained in:
parent
ff09a41807
commit
3e87033145
@ -41,6 +41,12 @@ static struct audio_output *audioOutputArray;
|
|||||||
static unsigned int audioOutputArraySize;
|
static unsigned int audioOutputArraySize;
|
||||||
|
|
||||||
unsigned int audio_output_count(void)
|
unsigned int audio_output_count(void)
|
||||||
|
{
|
||||||
|
return audioOutputArraySize;
|
||||||
|
}
|
||||||
|
|
||||||
|
static unsigned
|
||||||
|
audio_output_config_count(void)
|
||||||
{
|
{
|
||||||
unsigned int nr = 0;
|
unsigned int nr = 0;
|
||||||
const struct config_param *param = NULL;
|
const struct config_param *param = NULL;
|
||||||
@ -60,7 +66,7 @@ void initAudioDriver(void)
|
|||||||
|
|
||||||
notify_init(&audio_output_client_notify);
|
notify_init(&audio_output_client_notify);
|
||||||
|
|
||||||
audioOutputArraySize = audio_output_count();
|
audioOutputArraySize = audio_output_config_count();
|
||||||
audioOutputArray = g_new(struct audio_output, audioOutputArraySize);
|
audioOutputArray = g_new(struct audio_output, audioOutputArraySize);
|
||||||
|
|
||||||
for (i = 0; i < audioOutputArraySize; i++)
|
for (i = 0; i < audioOutputArraySize; i++)
|
||||||
|
@ -29,6 +29,10 @@ struct tag;
|
|||||||
struct client;
|
struct client;
|
||||||
struct config_param;
|
struct config_param;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the total number of audio output devices, including those
|
||||||
|
* who are disabled right now.
|
||||||
|
*/
|
||||||
unsigned int audio_output_count(void);
|
unsigned int audio_output_count(void);
|
||||||
|
|
||||||
void getOutputAudioFormat(const struct audio_format *inFormat,
|
void getOutputAudioFormat(const struct audio_format *inFormat,
|
||||||
|
Loading…
Reference in New Issue
Block a user