THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 11/12/2012 at 11:05, xxxxxxxx wrote:
Cinema 4D Version: 13
Platform: Mac OSX ;
Language(s) : C++ ;
I've got a button that's loading a sound and playing it. I want to get the volume of sound at each update which I think SDataEx will give me. So I have a loop that runs when the sound is playing and I'm printing out the data for SDataEx, but it always prints out 0.
Here's my code.
if (!fn.FileSelect(FILESELECTTYPE_ANYTHING, FILESELECT_LOAD, "Load Sound")) return FALSE;
if (!sound) return FALSE;
if (!sound->Load(fn)) return FALSE;
if (!playsound) return FALSE;
GePrint("pos: " + RealToString(playsound->GetPositionEstimate()));
I'm almost positive that I'm making a simple mistake, but I can't figure what it is.
On 18/12/2012 at 01:39, xxxxxxxx wrote:
I tested your code (with maxon_technoloop2.wav located in CINEMA ex utorials ) and it does work as expected; left and right sound samples have useful values.
Also, I think it's not necessary to call sound->Init(5,5,5);
On 19/12/2012 at 16:33, xxxxxxxx wrote:
Thanks for the response, Yannick. I tested the same file and it worked! I'm glad my code was right, but my sound file wasn't despite my best attempt to convert it to the correct type. I'm glad I was half right.