Old 03-09-2017, 03:45 PM   #1
rjlwest
Human being with feelings
 
Join Date: Nov 2016
Posts: 14
Default cant seem to make reaper play from API calls

auto SetPlayState = [=](bool play, bool stop)
{
if(play)
{
//OnPlayButton();
CSurf_OnPlay();
//IReaperControlSurface* ignoresurf;
//CSurf_SetPlayState(true, false, false, ignoresurf);
}
else if(stop)
{
//OnStopButton();
CSurf_OnStop();
//IReaperControlSurface* ignoresurf;
//CSurf_SetPlayState(false, false, false, ignoresurf);
}
};

I've tried these 3 different ways, OnPlayButton() and CSurf_OnPlay() will start the project playing but no audio will be heard. CSurf_SetPlayState() does nothing. I call the function on the main thread. What am I doing wrong?
rjlwest is offline   Reply With Quote
Old 03-10-2017, 07:26 AM   #2
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

If the playback starts in Reaper but you don't hear anything, I suspect it's a Reaper configuration issue. Maybe you have the option enabled that puts the audio media offline when Reaper is not the active application?
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 03-10-2017, 03:25 PM   #3
rjlwest
Human being with feelings
 
Join Date: Nov 2016
Posts: 14
Default

its definitely the audio device going to sleep. if the project is playing then i can stop it, and play it again from the standalone program. i just cant start it if its in a stopped state. also it needs to be stopped when i bring focust back to reaper, otherwise it will never be able to play from reaper, as though it being in a playing yet inaudible state will prevent the audio device from waking up when it regains focus.

the setting in preferences audio > close audio device when stopped, doesnt have any effect. maybe its a bug on mac.
rjlwest is offline   Reply With Quote
Old 03-10-2017, 03:35 PM   #4
rjlwest
Human being with feelings
 
Join Date: Nov 2016
Posts: 14
Default

yeh check that out, option is unticked yet the wavefiles still show as offline when focus is lost

rjlwest is offline   Reply With Quote
Old 03-10-2017, 03:56 PM   #5
rjlwest
Human being with feelings
 
Join Date: Nov 2016
Posts: 14
Default

there is a 2nd option that must be unticked media > set media items offline when app is inactive
rjlwest is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 10:48 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.