MixAudio Reference Manual | ||||
---|---|---|---|---|
Top | Description |
#include <mixacp.h> enum MixACPOpAlign; enum MixACPBPSType; enum MixDecodeMode; MixAudioConfigParams; MixAudioConfigParams * mix_acp_new (void); MixAudioConfigParams * mix_acp_ref (MixAudioConfigParams *mix); #define mix_acp_unref (obj) #define MIX_ACP_DECODEMODE (obj) #define MIX_ACP_NUM_CHANNELS (obj) #define MIX_ACP_BITRATE (obj) #define MIX_ACP_SAMPLE_FREQ (obj) MixDecodeMode mix_acp_get_decodemode (MixAudioConfigParams *obj); MIX_RESULT mix_acp_set_decodemode (MixAudioConfigParams *obj, MixDecodeMode mode); gchar * mix_acp_get_streamname (MixAudioConfigParams *obj); MIX_RESULT mix_acp_set_streamname (MixAudioConfigParams *obj, const gchar *streamname); MIX_RESULT mix_acp_set_audio_manager (MixAudioConfigParams *obj, MixAudioManager am); MixAudioManager mix_acp_get_audio_manager (MixAudioConfigParams *obj); gboolean mix_acp_is_streamname_valid (MixAudioConfigParams *obj); MixACPBPSType mix_acp_get_bps (MixAudioConfigParams *obj); MIX_RESULT mix_acp_set_bps (MixAudioConfigParams *obj, MixACPBPSType type); MixACPOpAlign mix_acp_get_op_align (MixAudioConfigParams *obj); MIX_RESULT mix_acp_set_op_align (MixAudioConfigParams *obj, MixACPOpAlign op_align);
MixAudio configuration parameters object which is used to communicate audio specific parameters.
This object is should not be instantiated as codec specific parameters are definied in individual derive classes.
typedef enum { MIX_ACP_OUTPUT_ALIGN_UNKNOWN=-1, MIX_ACP_OUTPUT_ALIGN_16=0, MIX_ACP_OUTPUT_ALIGN_MSB, MIX_ACP_OUTPUT_ALIGN_LSB, MIX_ACP_OUTPUT_ALIGN_LAST } MixACPOpAlign;
Audio Output alignment.
typedef enum { MIX_ACP_BPS_UNKNOWN=0, MIX_ACP_BPS_16=16, MIX_ACP_BPS_24=24, } MixACPBPSType;
Audio Output Size in bits per sample.
typedef enum { MIX_DECODE_NULL=0, MIX_DECODE_DIRECTRENDER, MIX_DECODE_DECODERETURN, MIX_DECODE_LAST } MixDecodeMode;
Operation Mode for a MI-X session. See mix_audio_configure()
.
typedef struct { MixParams parent; /* Audio Session Parameters */ MixDecodeMode decode_mode; gchar *stream_name; MixAudioManager audio_manager; /* Audio Format Parameters */ gint num_channels; gint bit_rate; gint sample_freq; MixACPBPSType bits_per_sample; MixACPOpAlign op_align; } MixAudioConfigParams;
MixAudio
configuration parameters object.
MixParams |
parent. |
MixDecodeMode |
Decode Mode to use for current session. See mix_acp_set_decodemode |
gchar * |
Stream name. See mix_acp_set_streamname. This object will release the string upon destruction. |
MixAudioManager |
Type of Audio Manager. See mix_acp_set_audio_manager. |
gint |
Number of output channels. See MIX_ACP_NUM_CHANNELS |
gint |
Optional. See MIX_ACP_BITRATE |
gint |
Output frequency. See MIX_ACP_SAMPLE_FREQ |
MixACPBPSType |
Number of output bit per sample. See mix_acp_set_bps |
MixACPOpAlign |
Output Byte Alignment. See mix_acp_set_op_align |
MixAudioConfigParams * mix_acp_new (void);
Use this method to create new instance of MixAudioConfigParams
|
A newly allocated instance of MixAudioConfigParams |
MixAudioConfigParams * mix_acp_ref (MixAudioConfigParams *mix);
Add reference count.
|
object to add reference |
|
the MixAudioConfigParams instance where reference count has been increased. |
#define mix_acp_unref(obj) mix_params_unref(MIX_PARAMS(obj))
Decrement reference count of the object.
|
object to unref. |
#define MIX_ACP_DECODEMODE(obj) (MIX_AUDIOCONFIGPARAMS(obj)->decode_mode)
MixAudioConfigParam.decode_mode accessor.
Configure the decode mode to one of MixDecodeMode value.
|
MixAudioConfigParams object |
#define MIX_ACP_NUM_CHANNELS(obj) (MIX_AUDIOCONFIGPARAMS(obj)->num_channels)
MixAudioConfigParam.num_channels accessor.
Configure the number of output channels. This value need to be exact the same as the supported output channel in the audio since down-mixing is not supported.
This value can be used during MIX_DECODE_DECODERETURN mode for buffer size/duration calculation.
In Moorestown, number of channel must be 1 or 2.
|
MixAudioConfigParams object |
#define MIX_ACP_BITRATE(obj) (MIX_AUDIOCONFIGPARAMS(obj)->bit_rate)
MixAudioConfigParam.bit_rate accessor.
Bit rate of the current audio.
Optional
|
MixAudioConfigParams object |
#define MIX_ACP_SAMPLE_FREQ(obj) (MIX_AUDIOCONFIGPARAMS(obj)->sample_freq)
MixAudioConfigParam.sample_freq accessor.
Output sampling frequency.
This value can be used during MIX_DECODE_DECODERETURN mode for buffer size/duration calculation.
|
MixAudioConfigParams object |
MixDecodeMode mix_acp_get_decodemode (MixAudioConfigParams *obj);
Retrieve currently configured MixDecodeMode.
|
MixAudioConfigParams |
|
MixDecodeMode |
MIX_RESULT mix_acp_set_decodemode (MixAudioConfigParams *obj, MixDecodeMode mode);
Configure session for one of the MixDecodeMode.
|
MixAudioConfigParams |
|
MixDecodeMode to set |
|
MIX_RESULT |
gchar * mix_acp_get_streamname (MixAudioConfigParams *obj);
Return copy of streamname. caller must free with g_free()
|
MixAudioConfigParams |
|
pointer to a copy of the stream name. NULL if name is not available. |
MIX_RESULT mix_acp_set_streamname (MixAudioConfigParams *obj, const gchar *streamname);
Set the stream name. The object will make a copy of the input stream name string.
|
MixAudioConfigParams |
|
Stream name to set |
|
MIX_RESULT |
MIX_RESULT mix_acp_set_audio_manager (MixAudioConfigParams *obj, MixAudioManager am);
Set the Audio Manager to one of the MixAudioManager.
|
MixAudioConfigParams |
|
MixAudioManager |
|
MIX_RESULT |
MixAudioManager mix_acp_get_audio_manager (MixAudioConfigParams *obj);
Retrieve name of currently configured audio manager.
|
MixAudioConfigParams |
|
MixAudioManager |
gboolean mix_acp_is_streamname_valid (MixAudioConfigParams *obj);
Check if stream name is valid considering the current Decode Mode.
|
MixAudioConfigParams |
|
boolean indicates if stream name is valid. |
MixACPBPSType mix_acp_get_bps (MixAudioConfigParams *obj);
Retrive currently configured bit-per-stream value.
|
MixAudioConfigParams |
|
MixACPBPSType |
MIX_RESULT mix_acp_set_bps (MixAudioConfigParams *obj, MixACPBPSType type);
Configure bit-per-stream of one of the supported MixACPBPSType.
|
MixAudioConfigParams |
|
MixACPBPSType to set |
|
MIX_RESULT |
MixACPOpAlign mix_acp_get_op_align (MixAudioConfigParams *obj);
Get Output Alignment.
|
MixAudioConfigParams object |
|
MixACPOpAlign |
MIX_RESULT mix_acp_set_op_align (MixAudioConfigParams *obj, MixACPOpAlign op_align);
Set Output Alignment to one of the MixACPOpAlign value.
|
MixAudioConfigParams object |
|
One of the supported MixACPOpAlign |
|
MIX_RESULT |