You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
FR: Expose PCM_source::GetBitsPerSample() to ReaScript API #1010
It would be nice if we could expose it to ReaScript API, as handling such thing from ReaScript requires quite a lot of code. Here, it will be just one line.
@cfillion Excellent ! So more handy that the whole lua code I use to have (more than 100lines, with a shell comand etc for v1, then full file parsing for v2 in 20 lines... not just 1 !).
I tested with all bit depth avaible by wavefile, seems to work good,
exept very esoteric one like 4 (IMA ADPCM) and Bits/sample: 2 (cADPCM) which returns simply 16, but I honestly don't know them maybe it is expected (also, it is not on SWS side to fix this). In Media Properties and BWFMetaEdit, they do appears like 4 and 2 bits files though. SO I guess it will be something to fix on cockos side. (and add a note in the doc meanwhile)
(the 2 and 4 bits return 16 with the function)
Nice thing is that it do work for mp3 and flac ! I didn't test other formats.
Activity
API: Expose PCM_source::GetBitsPerSample to ReaScript (closes reaper-…
cfillion commentedon Jun 15, 2018
I also added APIs for getting/setting pcm sources online/offline status. The test build is at https://cfillion.ca/files/sws/pcm-source-api/.
X-Raym commentedon Jun 15, 2018
@cfillion Excellent ! So more handy that the whole lua code I use to have (more than 100lines, with a shell comand etc for v1, then full file parsing for v2 in 20 lines... not just 1 !).
I tested with all bit depth avaible by wavefile, seems to work good,
exept very esoteric one like 4 (IMA ADPCM) and Bits/sample: 2 (cADPCM) which returns simply 16, but I honestly don't know them maybe it is expected (also, it is not on SWS side to fix this). In Media Properties and BWFMetaEdit, they do appears like 4 and 2 bits files though. SO I guess it will be something to fix on cockos side. (and add a note in the doc meanwhile)
(the 2 and 4 bits return 16 with the function)
Nice thing is that it do work for mp3 and flac ! I didn't test other formats.
cfillion commentedon Jun 16, 2018
That's odd, considering REAPER correctly identifies those in the Source Properties window.