Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /** quick hack to pick asio/wasapi in OF0.9x this won't be necessary in of1.0 **/
- /** step 1: open libs/openFrameworks/sound/ofRtAudioSoundStream.cpp **/
- #include <wchar.h>
- bool checkForAsioArgs() {
- LPWSTR *szArgList;
- int argCount;
- szArgList = CommandLineToArgvW(GetCommandLine(), &argCount);
- if (szArgList != NULL) {
- for (int i = 0; i < argCount; i++) {
- if (wcscmp(szArgList[i], L"asio")==0) {
- return true;
- }
- }
- LocalFree(szArgList);
- }
- return false;
- }
- bool of_rtaudiostream_use_asio = checkForAsioArgs();
- #define OF_RTAUDIO_API (of_rtaudiostream_use_asio?RtAudio::Api::WINDOWS_ASIO:RtAudio::Api::WINDOWS_WASAPI)
- /** step 2: there are two occurences of new RtAudio() in that same file. use instead: **/
- new RtAudio(OF_RTAUDIO_API)
- /** step 3: now build the solution (don't run it!). **/
- /** step 4: create a shortcut
- In windows explorer right click on myApp/bin/myApp.exe and create a new shortcut.
- rename it to "myApp.exe - Asio" so it's easy to find.
- edit the shortcut. at the end of shortcut target add an 'asio' argument.
- for me the target is now:
- C:\Users\be\Desktop\of_v0.9.3_vs_release\apps\myApps\sketchyscope\bin\sketchyscope.exe asio
- don't worry about the absolute path. windows knows how to fix things if it gets moved around.
- **/
- /** step 5: double click your shortcut. **/
Add Comment
Please, Sign In to add comment