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
@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 !).
item = reaper.GetSelectedMediaItem( 0, 0 )
take = reaper.GetActiveTake( item )
source = reaper.GetMediaItemTake_Source( take )
bit_depth = reaper.CF_GetMediaSourceBitDepth(source)
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.