mirror of
https://github.com/thestk/stk
synced 2026-01-17 06:41:51 +00:00
Updates to eguitar, ragamatic and examples project files for new RtAudio API.
This commit is contained in:
@@ -291,11 +291,8 @@ int main( int argc, char *argv[] )
|
||||
parameters.deviceId = dac.getDefaultOutputDevice();
|
||||
parameters.nChannels = 2;
|
||||
unsigned int bufferFrames = RT_BUFFER_SIZE;
|
||||
try {
|
||||
dac.openStream( ¶meters, NULL, format, (unsigned int)Stk::sampleRate(), &bufferFrames, &tick, (void *)&data );
|
||||
}
|
||||
catch ( RtAudioError& error ) {
|
||||
error.printMessage();
|
||||
if ( dac.openStream( ¶meters, NULL, format, (unsigned int)Stk::sampleRate(), &bufferFrames, &tick, (void *)&data ) ) {
|
||||
std::cout << dac.getErrorText() << std::endl;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
@@ -314,11 +311,8 @@ int main( int argc, char *argv[] )
|
||||
(void) signal( SIGINT, finish );
|
||||
|
||||
// If realtime output, set our callback function and start the dac.
|
||||
try {
|
||||
dac.startStream();
|
||||
}
|
||||
catch ( RtAudioError &error ) {
|
||||
error.printMessage();
|
||||
if ( dac.startStream() ) {
|
||||
std::cout << dac.getErrorText() << std::endl;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
@@ -329,15 +323,9 @@ int main( int argc, char *argv[] )
|
||||
}
|
||||
|
||||
// Shut down the output stream.
|
||||
try {
|
||||
dac.closeStream();
|
||||
}
|
||||
catch ( RtAudioError& error ) {
|
||||
error.printMessage();
|
||||
}
|
||||
dac.closeStream();
|
||||
|
||||
cleanup:
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user