home *** CD-ROM | disk | FTP | other *** search
Wrap
aaaaffffSSSSeeeettttVVVViiiirrrrttttuuuuaaaallllSSSSaaaammmmpppplllleeeeFFFFoooorrrrmmmmaaaatttt((((3333ddddmmmm)))) aaaaffffSSSSeeeettttVVVViiiirrrrttttuuuuaaaallllSSSSaaaammmmpppplllleeeeFFFFoooorrrrmmmmaaaatttt((((3333ddddmmmm)))) NNNNAAAAMMMMEEEE afSetVirtualSampleFormat, afSetVirtualByteOrder, afSetVirtualChannels, afSetVirtualRate, afSetVirtualPCMMapping - set the virtual data format for a specified audio track SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////aaaauuuuddddiiiiooooffffiiiilllleeee....hhhh>>>> iiiinnnntttt aaaaffffSSSSeeeettttVVVViiiirrrrttttuuuuaaaallllSSSSaaaammmmpppplllleeeeFFFFoooorrrrmmmmaaaatttt((((AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee ffffiiiilllleeee,,,, iiiinnnntttt ttttrrrraaaacccckkkk,,,, iiiinnnntttt ssssaaaammmmppppffffmmmmtttt,,,, iiiinnnntttt ssssaaaammmmppppwwwwiiiiddddtttthhhh)))) iiiinnnntttt aaaaffffSSSSeeeettttVVVViiiirrrrttttuuuuaaaallllBBBByyyytttteeeeOOOOrrrrddddeeeerrrr((((AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee ffffiiiilllleeee,,,, iiiinnnntttt ttttrrrraaaacccckkkk,,,, iiiinnnntttt bbbbyyyytttteeeeoooorrrrddddeeeerrrr)))) iiiinnnntttt aaaaffffSSSSeeeettttVVVViiiirrrrttttuuuuaaaallllCCCChhhhaaaannnnnnnneeeellllssss((((AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee ffffiiiilllleeee,,,, iiiinnnntttt ttttrrrraaaacccckkkk,,,, iiiinnnntttt cccchhhhaaaannnnnnnneeeellllssss)))) iiiinnnntttt aaaaffffSSSSeeeettttVVVViiiirrrrttttuuuuaaaallllRRRRaaaatttteeee((((AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee ffffiiiilllleeee,,,, iiiinnnntttt ttttrrrraaaacccckkkk,,,, ddddoooouuuubbbblllleeee rrrraaaatttteeee)))) iiiinnnntttt aaaaffffSSSSeeeettttVVVViiiirrrrttttuuuuaaaallllPPPPCCCCMMMMMMMMaaaappppppppiiiinnnngggg((((AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee ffffiiiilllleeee,,,, iiiinnnntttt ttttrrrraaaacccckkkk,,,, ddddoooouuuubbbblllleeee ssssllllooooppppeeee,,,, ddddoooouuuubbbblllleeee iiiinnnntttteeeerrrrcccceeeepppptttt,,,, ddddoooouuuubbbblllleeee mmmmiiiinnnncccclllliiiipppp,,,, ddddoooouuuubbbblllleeee mmmmaaaaxxxxcccclllliiiipppp)))) PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRR Parameters for the virtual routines are identical to those for the equivalent afInit routines, except the first argument is an AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee structure rather than an AAAAFFFFffffiiiilllleeeesssseeeettttuuuupppp. _f_i_l_e is an AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee structure, previously created by a call to aaaaffffOOOOppppeeeennnnFFFFiiiilllleeee(3dm) or its equivalent. _t_r_a_c_k is an integer which identifies an audio track in _h_a_n_d_l_e. Since all currently supported file formats contain only one audio track, the value AAAAFFFF____DDDDEEEEFFFFAAAAUUUULLLLTTTT____TTTTRRRRAAAACCCCKKKK should always be used here. _s_a_m_p_f_m_t an integer constant which denotes a virtual sample format. _s_a_m_p_w_i_d_t_h a positive integer value which specifies the number of bits in a virtual sample data point. _c_h_a_n_n_e_l_s is a positive integer value which indicates the number of interleaved audio channels in the audio track. _b_y_t_e_o_r_d_e_r is a positive integer token which indicates the byte order of the samples in the audio track. _r_a_t_e is a double precision floating point value indicating the sampling rate for the virtual audio data. PPPPaaaaggggeeee 1111 aaaaffffSSSSeeeettttVVVViiiirrrrttttuuuuaaaallllSSSSaaaammmmpppplllleeeeFFFFoooorrrrmmmmaaaatttt((((3333ddddmmmm)))) aaaaffffSSSSeeeettttVVVViiiirrrrttttuuuuaaaallllSSSSaaaammmmpppplllleeeeFFFFoooorrrrmmmmaaaatttt((((3333ddddmmmm)))) _s_l_o_p_e is a double precision floating point value _i_n_t_e_r_c_e_p_t is a double precision floating point value indicating the audio data sample zero-crossing value for the given sample format and width _m_i_n_c_l_i_p is a double precision floating point value indicating the minimum or most negative audio data sample value to be returned. Any value less than this will be set to _m_i_n_c_l_i_p _m_a_x_c_l_i_p is a double precision floating point value indicating the maximum or most positive audio data sample value to be returned. Any value greater than this will be set to _m_a_x_c_l_i_p DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN When a audio data is read from a file into the application's data buffer using aaaaffffRRRReeeeaaaaddddFFFFrrrraaaammmmeeeessss(3dm), the format of the data loaded into the buffer can vary independently of the actual file data format. This independent format is call the _v_i_r_t_u_a_l _f_o_r_m_a_t of the data. Once some aspect of the virtual data format is set via one of the above-described routines, the conversion of the _f_i_l_e _f_o_r_m_a_t into the _v_i_r_t_u_a_l _f_o_r_m_a_t happens automatically and transparently. This allows an application to choose to ignore the data format in the file entirely, and specify only the format in which it wants the data to appear in the aaaaffffRRRReeeeaaaaddddFFFFrrrraaaammmmeeeessss(3dm) buffer. See aaaaffffIIIInnnnttttrrrroooo(3dm) for more information about the virtual format. aaaaffffSSSSeeeettttVVVViiiirrrrttttuuuuaaaallllSSSSaaaammmmpppplllleeeeFFFFoooorrrrmmmmaaaatttt(((()))) sets the virtual sample format and width parameters for the audio data buffer. The following values may be used for _s_a_m_p_f_m_t AAAAFFFF____SSSSAAAAMMMMPPPPFFFFMMMMTTTT____TTTTWWWWOOOOSSSSCCCCOOOOMMMMPPPP Two's complement samples. AAAAFFFF____SSSSAAAAMMMMPPPPFFFFMMMMTTTT____UUUUNNNNSSSSIIIIGGGGNNNNEEEEDDDD Unsigned samples. AAAAFFFF____SSSSAAAAMMMMPPPPFFFFMMMMTTTT____FFFFLLLLOOOOAAAATTTT 32-bit floating point samples. AAAAFFFF____SSSSAAAAMMMMPPPPFFFFMMMMTTTT____DDDDOOOOUUUUBBBBLLLLEEEE 64-bit double-precision floating point samples. aaaaffffSSSSeeeettttVVVViiiirrrrttttuuuuaaaallllBBBByyyytttteeeeOOOOrrrrddddeeeerrrr(((()))) sets the virtual byte order (big- or little- endian) of the samples in the audio buffer. The following values may be used for _b_y_t_e_o_r_d_e_r AAAAFFFF____BBBBYYYYTTTTEEEEOOOORRRRDDDDEEEERRRR____BBBBIIIIGGGGEEEENNNNDDDDIIIIAAAANNNN Big-endian byte order samples. This is the default value. AAAAFFFF____BBBBYYYYTTTTEEEEOOOORRRRDDDDEEEERRRR____LLLLIIIITTTTTTTTLLLLEEEEEEEENNNNDDDDIIIIAAAANNNN Little-endian byte order samples. aaaaffffSSSSeeeettttVVVViiiirrrrttttuuuuaaaallllCCCChhhhaaaannnnnnnneeeellllssss(((()))) sets the number of virtual interleaved channels in the audio buffer. If the virtual channel count does not equal the track channel count, channel conversion is performed via a channel mix matrix. PPPPaaaaggggeeee 2222 aaaaffffSSSSeeeettttVVVViiiirrrrttttuuuuaaaallllSSSSaaaammmmpppplllleeeeFFFFoooorrrrmmmmaaaatttt((((3333ddddmmmm)))) aaaaffffSSSSeeeettttVVVViiiirrrrttttuuuuaaaallllSSSSaaaammmmpppplllleeeeFFFFoooorrrrmmmmaaaatttt((((3333ddddmmmm)))) If this matrix is not specified, a default matrix will be used. This default matrix follows the same channel conversion rules as the Audio Library (libaudio). See aaaaffffSSSSeeeettttCCCChhhhaaaannnnnnnneeeellllMMMMaaaattttrrrriiiixxxx(3dm) for details. aaaaffffSSSSeeeettttVVVViiiirrrrttttuuuuaaaallllRRRRaaaatttteeee(((()))) sets the virtual sampling rate for the audio buffer. If the track sampling rate is different, the data will be rate-converted using one of several conversion algorithms. See aaaaffffSSSSeeeettttCCCCoooonnnnvvvveeeerrrrssssiiiioooonnnnPPPPaaaarrrraaaammmmssss(3dm) for more information. aaaaffffSSSSeeeettttVVVViiiirrrrttttuuuuaaaallllPPPPCCCCMMMMMMMMaaaappppppppiiiinnnngggg(((()))) sets the virtual PCM mapping values for the audio buffer. The range, zero-crossing, and clipping values for the data placed in the audio buffer will be determined via a transformation calculated from the relationship between the file's PCM mapping and the requested mapping. In general, all two's complement and floating point sample formats are expected to be symmetrical about zero, i.e., the iiiinnnntttteeeerrrrcccceeeepppptttt will be 0.0 and _m_i_n_c_l_i_p and _m_a_x_c_l_i_p will be negative and positive N, where N is some non-zero positive value. If this routine is used, it must be called _a_f_t_e_r any calls to aaaaffffSSSSeeeettttVVVViiiirrrrttttuuuuaaaallllSSSSaaaammmmpppplllleeeeFFFFoooorrrrmmmmaaaatttt(((()))). Resetting the virtual sample format automatically resets the PCM mapping to the default values for the requested format. SSSSEEEEEEEE AAAALLLLSSSSOOOO afOpenFile(3dm), afReadFrames(3dm), afWriteFrames(3dm), afGetVirtualSampleFormat(3dm), afGetVirtualChannels(3dm), afSetChannelMatrix(3dm), afGetVirtualByteOrder(3dm), afGetVirtualPCMMapping(3dm), afGetVirtualRate(3dm) PPPPaaaaggggeeee 3333