Play indefinitely on iPhone

I need to play the sound of the “horn” when the user touches the screen.

The sound of the sound signal shall be reproduced as long as the user's finger remains in contact with the screen.

The end of the sound effect will be different. Imagine that the horn is “dusty" at the end when the airflow decreases.

Will I need to stitch 2 audio files together? Do I need to use remote I / O since the time will be so critical?

This library looks like an opportunity: http://www.surina.net/soundtouch/

It seems that I could play the sound endlessly, but I have not yet implemented it, so I'm not sure.

I feel this will be a common problem in game programming, but I have little experience in this area.

I have never used audio before, so I can’t get started. (I only needed to use AVAudioPlayer in my applications before.)

Any suggestions on using the library or using technology will be helpful.

+3
source share
4 answers

To make it realistic, you will need three sounds:

  • Attack. . This is the beginning of the sound; this is the most important part of sound, because it is this part of the brain that is used to determine what sound is. The sound then fades a little and becomes ...

  • Sustain.. , , . , "" , .

  • Release. , , .

, Audacity, . .

+5

.

IPhone-DJ Google Code .

, .

+1

iphone. , , "petering out" . , , , , . , , ( , ).

, , . , .

0

( WAV MP3 ) , , . iPhone MIDI ( MIDI, ), . MIDI , (, ), , ( , "" ). MIDI- 128 ( ), .

0
source

Source: https://habr.com/ru/post/1713708/


All Articles