Old 08-21-2016, 12:10 AM   #1
Reno.thestraws
Human being with feelings
 
Reno.thestraws's Avatar
 
Join Date: Nov 2009
Location: Belgium
Posts: 10,474
Default Request - Script to request block size

Hi All
Is there a way to set the buffer size of the audio device by a script

the same thing that the pref "request block size do" but in a script

Would be very useful to set low latency ONLY WHEN IT NEEDS without having to open the divice configuration
__________________
http://www.residenceemilia.com
Reno.thestraws is offline   Reply With Quote
Old 10-04-2016, 10:42 PM   #2
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,866
Default

Settings parameters are registred in reaper.ini file (from resource folder),
and so can be modified with a SWS function dedicated to this.
This is from the reaper.ini
Code:
[audioconfig]
...
asio_bsize=512
so you can adjust these functions
ReaScripts-Templates/X-Raym_Get REAPER.ini value.lua at master · ReaTeam/ReaScripts-Templates

based on that.
X-Raym is offline   Reply With Quote
Old 05-29-2020, 03:59 AM   #3
rasmusmarshagen
Human being with feelings
 
Join Date: May 2020
Posts: 53
Default Block Size script

Hi @X-Raym

I want achieve exactly this, changing the "request block size" number via an action/script.

I've clicked the github-link but I really don't know what to do here. How do I turn this into a script/action? I've tried just copying the 4 lines of code into a new script, but surely those are not the correct lines for this no?

I'm on MAC and my audio device is UA Apollo x6 thunderbolt.

Would be really really grateful for a step by step instruction on how to make this work.

Thank you!!! /Rasmus
rasmusmarshagen is offline   Reply With Quote
Old 05-29-2020, 04:12 AM   #4
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,866
Default

Hi !


Indeed these are not the good line, these were just a template.


Good line would be


Code:
inipath = reaper.get_ini_file()

retval, value = reaper.BR_Win32_GetPrivateProfileString("reaper", "asio_bsize", "512", inipath)
Or

Code:
reaper.Audio_Quit()
reaper.SNM_SetIntConfigVar( "asio_bsize", 512 )
fa
reaper.Audio_Init()
But this doesn't to work, both method return an error message... SO I'm not sure it is possible.
X-Raym is offline   Reply With Quote
Old 05-29-2020, 04:26 AM   #5
rasmusmarshagen
Human being with feelings
 
Join Date: May 2020
Posts: 53
Default Block Size script

Thanks for the fast response! And thanks for trying. Too bad it doesn't work though- really would've loved the possibility to change block size via an action
rasmusmarshagen 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 12:08 AM.


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