ArrayArrayArrayArrayArray
Statistics: Posted by 23fx23 — 16 Apr 2015, 19:51
Statistics: Posted by 23fx23 — 15 Apr 2015, 22:03
CODE:
BLOC_SMP_BUFFER = new float[BlocSize];CODE:
// declare a TPrecision* ptrBufferBloc member in the include fileif (PLAY){// should be in onBlockSizeChanged callbacksdkSetEvtSize(Audio_Out, BlocSize);sdkSetEvtSize(AudioOut, BlocSize);CurrentBloc = CurrentBloc + 1;// floor(( SMP_DURATION / BlocSize )) can be preconputed outside of onProcess// in onBlockSizeChanged callback precisely // but should also take care of when SMP_DURATION changeif (CurrentBloc > floor(( SMP_DURATION / BlocSize ))){CurrentBloc = 0;}ptrBufferBloc = sdkGetEvtDataAddr (AudioOut);memcpy ((void*)ptrBufferBloc, (void*)(SMP_BUFFER + (CurrentBloc * BlocSize)); }}Statistics: Posted by martignasse — 15 Apr 2015, 21:19
CODE:
if (PLAY){BLOC_SMP_BUFFER = new float[BlocSize];sdkSetEvtSize(Audio_Out, BlocSize); //set size temporary here for debug, will be in callbacksdkSetEvtSize(AudioOut, BlocSize); // Audio_Out is a ptArray, AudioOut ptAudiioCurrentBloc = CurrentBloc + 1;if (CurrentBloc > floor(( SMP_DURATION / BlocSize ))) // loops if reaching end of buffer{CurrentBloc = 0;}for (int i = 0; i < BlocSize; i++){BLOC_SMP_BUFFER[i] = SMP_BUFFER[i + (CurrentBloc * BlocSize)]; //preparing a blocsize filled buffer//sdkSetEvtArrayData(Audio_Out, i, SMP_BUFFER[i + (CurrentBloc * BlocSize)]); // old code that was working if ptArrayOut//sdkSetEvtPointer(AudioOut, BLOC_SMP_BUFFER);}sdkSetEvtPointer(AudioOut, BLOC_SMP_BUFFER); // trying to set the ptaudio out, doesn't seem to work, what's the correct way of doing?}Statistics: Posted by 23fx23 — 15 Apr 2015, 17:22
Statistics: Posted by 23fx23 — 16 Apr 2015, 19:51
Statistics: Posted by 23fx23 — 15 Apr 2015, 22:03
CODE:
BLOC_SMP_BUFFER = new float[BlocSize];CODE:
// declare a TPrecision* ptrBufferBloc member in the include fileif (PLAY){// should be in onBlockSizeChanged callbacksdkSetEvtSize(Audio_Out, BlocSize);sdkSetEvtSize(AudioOut, BlocSize);CurrentBloc = CurrentBloc + 1;// floor(( SMP_DURATION / BlocSize )) can be preconputed outside of onProcess// in onBlockSizeChanged callback precisely // but should also take care of when SMP_DURATION changeif (CurrentBloc > floor(( SMP_DURATION / BlocSize ))){CurrentBloc = 0;}ptrBufferBloc = sdkGetEvtDataAddr (AudioOut);memcpy ((void*)ptrBufferBloc, (void*)(SMP_BUFFER + (CurrentBloc * BlocSize)); }}Statistics: Posted by martignasse — 15 Apr 2015, 21:19
CODE:
if (PLAY){BLOC_SMP_BUFFER = new float[BlocSize];sdkSetEvtSize(Audio_Out, BlocSize); //set size temporary here for debug, will be in callbacksdkSetEvtSize(AudioOut, BlocSize); // Audio_Out is a ptArray, AudioOut ptAudiioCurrentBloc = CurrentBloc + 1;if (CurrentBloc > floor(( SMP_DURATION / BlocSize ))) // loops if reaching end of buffer{CurrentBloc = 0;}for (int i = 0; i < BlocSize; i++){BLOC_SMP_BUFFER[i] = SMP_BUFFER[i + (CurrentBloc * BlocSize)]; //preparing a blocsize filled buffer//sdkSetEvtArrayData(Audio_Out, i, SMP_BUFFER[i + (CurrentBloc * BlocSize)]); // old code that was working if ptArrayOut//sdkSetEvtPointer(AudioOut, BLOC_SMP_BUFFER);}sdkSetEvtPointer(AudioOut, BLOC_SMP_BUFFER); // trying to set the ptaudio out, doesn't seem to work, what's the correct way of doing?}Statistics: Posted by 23fx23 — 15 Apr 2015, 17:22