mwhagedorn / FBAudio

FBAudio sample app with SoundTouch library target
11 stars 4 forks source link

it is crashing while setting NEW filed like Pitch #1

Open anil03 opened 9 years ago

anil03 commented 9 years ago

I am developing an app. In this app i want to set Tempo and Pitch of app. When i am setting pitch of app it is crashing. So Will you please let me know how do i set also pitch of the song while playing.

mwhagedorn commented 9 years ago

I need a little more specifics in order to be helpful

anil03 commented 9 years ago

Like you defined the Float variable as Tempo in FBSoundTouchAVAssetPlayer. So i declared one more variable for "Pitch" as float variable. After that i defined Getter and Setter for variable Tempo. i set initial value as 0 in setupSoundTouch method. And in FilteringCallback method i defined the "soundTouchEngine.setPitch( pitch );" From UI i am setting the value of Pitch using slider between value. When i do, it crashed

self.filteringCallback = ^(FBAVAssetPlayer player, char srcBuffer, UInt32 srcBytesAvailable, char dstBuffer, UInt32 dstBufferCapacity, UInt32 *dstBytesWritten ) { soundTouchEngine.setTempoChange( tempo ); soundTouchEngine.setPitch( pitch ); soundTouchEngine.putSamples((soundtouch::SAMPLETYPE)srcBuffer, srcBytesAvailable / 4); UInt32 samplesWritten = soundTouchEngine.receiveSamples((soundtouch::SAMPLETYPE) dstBuffer, 32768 / 4 ); dstBytesWritten = samplesWritten * 4; }; saying bad access.

So please let me know how do i use it Pitch and Tempo on runtime in ios

anil03 commented 9 years ago

When i tried to add into NEW xcode project as you said i am getting this error

ld: warning: ignoring file /Users/abhishekpanjikar/Documents/Developer/Xcode_Projects/AudioDemo/AudioDemo/HelperFile/FBAudioLib/SoundTouch.framework/SoundTouch, missing required architecture arm64 in file /Users/abhishekpanjikar/Documents/Developer/Xcode_Projects/AudioDemo/AudioDemo/HelperFile/FBAudioLib/SoundTouch.framework/SoundTouch (3 slices)

screen shot 2015-07-01 at 3 13 48 pm

mitkhatri commented 8 years ago

Any one get solution of this? Please let me know.