Modifying tests to use new methods of audio sample

parent 67088496
...@@ -11,7 +11,7 @@ int main( int, char** ) ...@@ -11,7 +11,7 @@ int main( int, char** )
{ {
CITAAudioSample asTTS48kHz( "tts.wav" ); CITAAudioSample asTTS48kHz( "tts.wav" );
CITAAudioSample asTTS44kHz; CITAAudioSample asTTS44kHz;
asTTS44kHz.LoadWithSampleRateConversion( asTTS48kHz ); asTTS44kHz.Load( asTTS48kHz );
asTTS44kHz.Store( "tts_44khz.wav" ); asTTS44kHz.Store( "tts_44khz.wav" );
cout << "Converted files." << endl; cout << "Converted files." << endl;
...@@ -24,17 +24,17 @@ int main( int, char** ) ...@@ -24,17 +24,17 @@ int main( int, char** )
try try
{ {
CITAAudioSample as44kfs; CITAAudioSample as44kfs;
CITAAudioSample as48kfs; CITAAudioSample as48kfs( 48000.0f );
CITAAudioSample as96kfs; CITAAudioSample as96kfs( 96000.0f );
CITAAudioSample as128kfs; CITAAudioSample as128kfs( 128000.0f );
as44kfs.Init( 2, 2 * 44100, 44.1e3, true ); as44kfs.Init( 2, 2 * 44100, 44.1e3, true );
as44kfs[ 0 ][ 0 ] = 1.0f; as44kfs[ 0 ][ 0 ] = 1.0f;
as44kfs[ 0 ][ as44kfs.GetLength() - 1 ] = -1.0f; as44kfs[ 0 ][ as44kfs.GetLength() - 1 ] = -1.0f;
as48kfs.LoadWithSampleRateConversion( as44kfs ); as48kfs.Load( as44kfs );
as96kfs.LoadWithSampleRateConversion( as48kfs ); as96kfs.Load( as48kfs );
as128kfs.LoadWithSampleRateConversion( as96kfs ); as128kfs.Load( as96kfs );
cout << "Converted." << endl; cout << "Converted." << endl;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment