1 /* 2 INTEL CONFIDENTIAL 3 Copyright 2009 Intel Corporation All Rights Reserved. 4 The source code contained or described herein and all documents related to the source code ("Material") are owned by Intel Corporation or its suppliers or licensors. Title to the Material remains with Intel Corporation or its suppliers and licensors. The Material contains trade secrets and proprietary and confidential information of Intel or its suppliers and licensors. The Material is protected by worldwide copyright and trade secret laws and treaty provisions. No part of the Material may be used, copied, reproduced, modified, published, uploaded, posted, transmitted, distributed, or disclosed in any way without Intel’s prior express written permission. 5 6 No license under any patent, copyright, trade secret or other intellectual property right is granted to or conferred upon you by disclosure or delivery of the Materials, either expressly, by implication, inducement, estoppel or otherwise. Any license under such intellectual property rights must be express and approved by Intel in writing. 7 */ 8 9 #ifndef __MIX_ACP_WMA_H__ 10 #define __MIX_ACP_WMA_H__ 11 12 13 #include "mixacp.h" 14 15 /** 16 * MIX_TYPE_AUDIOCONFIGPARAMSWMA: 17 * 18 * Get type of class. 19 */ 20 #define MIX_TYPE_AUDIOCONFIGPARAMSWMA (mix_acp_wma_get_type ()) 21 22 /** 23 * MIX_AUDIOCONFIGPARAMSWMA: 24 * @obj: object to be type-casted. 25 * 26 * Type casting. 27 */ 28 #define MIX_AUDIOCONFIGPARAMSWMA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MIX_TYPE_AUDIOCONFIGPARAMSWMA, MixAudioConfigParamsWMA)) 29 30 /** 31 * MIX_IS_AUDIOCONFIGPARAMSWMA: 32 * @obj: an object. 33 * 34 * Checks if the given object is an instance of #MixAudioConfigParamsWMA 35 */ 36 #define MIX_IS_AUDIOCONFIGPARAMSWMA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MIX_TYPE_AUDIOCONFIGPARAMSWMA)) 37 38 /** 39 * MIX_AUDIOCONFIGPARAMSWMA_CLASS: 40 * @klass: class to be type-casted. 41 * 42 * Type casting. 43 */ 44 #define MIX_AUDIOCONFIGPARAMSWMA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MIX_TYPE_AUDIOCONFIGPARAMSWMA, MixAudioConfigParamsWMAClass)) 45 46 /** 47 * MIX_IS_AUDIOCONFIGPARAMSWMA_CLASS: 48 * @klass: a class. 49 * 50 * Checks if the given class is #MixAudioConfigParamsWMAClass 51 */ 52 #define MIX_IS_AUDIOCONFIGPARAMSWMA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MIX_TYPE_AUDIOCONFIGPARAMSWMA)) 53 54 /** 55 * MIX_AUDIOCONFIGPARAMSWMA_GET_CLASS: 56 * @obj: a #MixAudioConfigParamsWMA object. 57 * 58 * Get the class instance of the object. 59 */ 60 #define MIX_AUDIOCONFIGPARAMSWMA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MIX_TYPE_AUDIOCONFIGPARAMSWMA, MixAudioConfigParamsWMAClass)) 61 62 /** 63 * MixAudioWMAVersion: 64 * @MIX_AUDIO_WMA_VUNKNOWN: WMA version undefined. 65 * @MIX_AUDIO_WMA_V9: WMA 9 66 * @MIX_AUDIO_WMA_V10: <emphasis>Not Supported</emphasis> WMA 10 67 * @MIX_AUDIO_WMA_V10P: <emphasis>Not Supported</emphasis> WMA 10 Pro 68 * @MIX_AUDIO_WMA_LAST: last entry. 69 * 70 * WMA version. 71 */ 72 typedef enum { 73 MIX_AUDIO_WMA_VUNKNOWN, 74 MIX_AUDIO_WMA_V9, 75 MIX_AUDIO_WMA_V10, 76 MIX_AUDIO_WMA_V10P, 77 MIX_AUDIO_WMA_LAST 78 } MixAudioWMAVersion; 79 80 typedef struct _MixAudioConfigParamsWMA MixAudioConfigParamsWMA; 81 typedef struct _MixAudioConfigParamsWMAClass MixAudioConfigParamsWMAClass; 82 83 /** 84 * MixAudioConfigParamsWMA: 85 * @parent: parent. 86 * @channel_mask: Channel Mask. See #MIX_ACP_WMA_CHANNEL_MASK 87 * @format_tag: Format tag. See #MIX_ACP_WMA_FORMAT_TAG 88 * @block_algin: Block alignment. See #MIX_ACP_WMA_BLOCK_ALIGN 89 * @wma_encode_opt: Encoder option. See #MIX_ACP_WMA_ENCODE_OPT 90 * @pcm_bit_width: Source pcm bit width. See #MIX_ACP_WMA_PCM_BIT_WIDTH 91 * @wma_version: WMA version. See #mix_acp_wma_set_version 92 * 93 * MI-X Audio Parameter object 94 */ 95 struct _MixAudioConfigParamsWMA 96 { 97 /*< public >*/ 98 MixAudioConfigParams parent; 99 100 /*< public >*/ 101 /* Audio Format Parameters */ 102 guint32 channel_mask; 103 guint16 format_tag; 104 guint16 block_align; 105 guint16 wma_encode_opt;/* Encoder option */ 106 guint8 pcm_bit_width; /* source pcm bit width */ 107 MixAudioWMAVersion wma_version; 108 }; 109 110 /** 111 * MixAudioConfigParamsWMAClass: 112 * 113 * MI-X Audio object class 114 */ 115 struct _MixAudioConfigParamsWMAClass 116 { 117 /*< public >*/ 118 MixAudioConfigParamsClass parent_class; 119 120 /* class members */ 121 }; 122 123 /** 124 * mix_acp_wma_get_type: 125 * @returns: type 126 * 127 * Get the type of object. 128 */ 129 GType mix_acp_wma_get_type (void); 130 131 /** 132 * mix_acp_wma_new: 133 * @returns: A newly allocated instance of #MixAudioConfigParamsWMA 134 * 135 * Use this method to create new instance of #MixAudioConfigParamsWMA 136 */ 137 MixAudioConfigParamsWMA *mix_acp_wma_new(void); 138 139 /** 140 * mix_acp_wma_ref: 141 * @mix: object to add reference 142 * @returns: the MixAudioConfigParamsWMA instance where reference count has been increased. 143 * 144 * Add reference count. 145 */ 146 MixAudioConfigParamsWMA *mix_acp_wma_ref(MixAudioConfigParamsWMA *mix); 147 148 /** 149 * mix_acp_wma_unref: 150 * @obj: object to unref. 151 * 152 * Decrement reference count of the object. 153 */ 154 #define mix_acp_wma_unref(obj) mix_params_unref(MIX_PARAMS(obj)) 155 156 /** 157 * MIX_ACP_WMA_CHANNEL_MASK: 158 * @obj: #MixAudioConfigParamsWMA object 159 * 160 * MixAudioConfigParamWMA.channel_mask accessor. 161 * 162 * Channel mask must be one of the following: 163 * 164 * 4: For single (1) channel output. 165 * 166 * 3: For stereo (2) channels output. 167 * 168 * Only 1 or 2 output channels are supported. 169 * 170 */ 171 #define MIX_ACP_WMA_CHANNEL_MASK(obj) (MIX_AUDIOCONFIGPARAMSWMA(obj)->channel_mask) 172 173 /** 174 * MIX_ACP_WMA_FORMAT_TAG: 175 * @obj: #MixAudioConfigParamsWMA object 176 * 177 * MixAudioConfigParamWMA.format_tag accessor. 178 * 179 * <remark>In Moorestown, only value 0x0161 combined with use of #MIX_AUDIO_WMA_V9 is supported.</remark> 180 */ 181 #define MIX_ACP_WMA_FORMAT_TAG(obj) (MIX_AUDIOCONFIGPARAMSWMA(obj)->format_tag) 182 183 /** 184 * MIX_ACP_WMA_BLOCK_ALIGN: 185 * @obj: #MixAudioConfigParamsWMA object 186 * 187 * MixAudioConfigParamWMA.block_align accessor. 188 * 189 * Block alignment indicates packet size. Available from ASF Header. 190 */ 191 #define MIX_ACP_WMA_BLOCK_ALIGN(obj) (MIX_AUDIOCONFIGPARAMSWMA(obj)->block_align) 192 193 /** 194 * MIX_ACP_WMA_ENCODE_OPT: 195 * @obj: #MixAudioConfigParamsWMA object 196 * 197 * MixAudioConfigParamWMA.wma_encode_opt accessor. 198 * 199 * Encoder option available from ASF header. 200 */ 201 #define MIX_ACP_WMA_ENCODE_OPT(obj) (MIX_AUDIOCONFIGPARAMSWMA(obj)->wma_encode_opt) 202 203 /** 204 * MIX_ACP_WMA_PCM_BIT_WIDTH: 205 * @obj: #MixAudioConfigParamsWMA object 206 * 207 * MixAudioConfigParamWMA.pcm_bit_width accessor. 208 * 209 * Source pcm bit width available from ASF Header. 210 */ 211 #define MIX_ACP_WMA_PCM_BIT_WIDTH(obj) (MIX_AUDIOCONFIGPARAMSWMA(obj)->pcm_bit_width) 212 213 /* Class Methods */ 214 /** 215 * mix_acp_wma_get_version: 216 * @obj: #MixAudioConfigParamsWMA object 217 * @returns: MixAudioWMAVersion 218 * 219 * Get WMA Version. 220 */ 221 MixAudioWMAVersion mix_acp_wma_get_version(MixAudioConfigParamsWMA *obj); 222 223 /** 224 * mix_acp_wma_set_version: 225 * @obj: #MixAudioConfigParamsWMA object 226 * @ver: MixAudioWMAVersion to set. 227 * @returns: MIX_RESULT. 228 * 229 * Set WMA Version. 230 * 231 * <remark>In Moorestown, only #MIX_AUDIO_WMA_V9 is supported</remark> 232 */ 233 MIX_RESULT mix_acp_wma_set_version(MixAudioConfigParamsWMA *obj, MixAudioWMAVersion ver); 234 235 #endif /* __MIX_AUDIOCONFIGPARAMSWMA_H__ */ 236