chansrv: add a utility function to convert wFormatTag into string
This commit is contained in:
@@ -88,6 +88,27 @@ static struct xr_wave_format_ex **g_client_formats = NULL;
|
|||||||
|
|
||||||
static int g_current_format = 0; /* index in g_client_formats */
|
static int g_current_format = 0; /* index in g_client_formats */
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This can be called from sound.c because it includes audin.h.
|
||||||
|
*/
|
||||||
|
|
||||||
|
const char *
|
||||||
|
audin_wave_format_tag_to_str(int tag)
|
||||||
|
{
|
||||||
|
return
|
||||||
|
(tag == WAVE_FORMAT_PCM) ? "WAVE_FORMAT_PCM" :
|
||||||
|
(tag == WAVE_FORMAT_ADPCM) ? "WAVE_FORMAT_ADPCM" :
|
||||||
|
(tag == WAVE_FORMAT_ALAW) ? "WAVE_FORMAT_ALAW" :
|
||||||
|
(tag == WAVE_FORMAT_MULAW) ? "WAVE_FORMAT_MULAW" :
|
||||||
|
(tag == WAVE_FORMAT_MULAW) ? "WAVE_FORMAT_MULAW" :
|
||||||
|
(tag == WAVE_FORMAT_MPEGLAYER3) ? "WAVE_FORMAT_MPEGLAYER3" :
|
||||||
|
(tag == WAVE_FORMAT_OPUS) ? "WAVE_FORMAT_OPUS" :
|
||||||
|
(tag == WAVE_FORMAT_AAC) ? "WAVE_FORMAT_AAC" :
|
||||||
|
NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
static int
|
static int
|
||||||
cleanup_client_formats(void)
|
cleanup_client_formats(void)
|
||||||
|
|||||||
@@ -22,6 +22,8 @@
|
|||||||
#ifndef _AUDIN_H_
|
#ifndef _AUDIN_H_
|
||||||
#define _AUDIN_H_
|
#define _AUDIN_H_
|
||||||
|
|
||||||
|
const char *
|
||||||
|
audin_wave_format_tag_to_str(int tag);
|
||||||
int
|
int
|
||||||
audin_init(void);
|
audin_init(void);
|
||||||
int
|
int
|
||||||
|
|||||||
Reference in New Issue
Block a user