iOS Code Snippet Play Beep Sound

Similar threads

B4i Question Play Beep Sound - Revisited
B4i Tutorial Background playback
B4i Question PlayBeep in background
B4i Tutorial Inline Objective C code
B4i Tutorial Background Fetch (Downloads)

aeric

Well-Known Member
Licensed User
B4X:
Sub PlayBeep
    Dim NativeMe As NativeObject = Me
    NativeMe.RunMethod("beep", Null)
End Sub

#If ObjC
#import <AVFoundation/AVAudioPlayer.h>
- (void) beep {
  AudioServicesPlaySystemSound(1302);
}
#End If
You can change the value of 1302 above to other sound ID.

List of SystemSoundIDs
https://github.com/TUNER88/iOSSystemSoundsLibrary
 

highflyer

Member
Licensed User
B4X:
Sub PlayBeep
    Dim NativeMe As NativeObject = Me
    NativeMe.RunMethod("beep", Null)
End Sub

#If ObjC
#import <AVFoundation/AVAudioPlayer.h>
- (void) beep {
  AudioServicesPlaySystemSound(1302);
}
#End If
You can change the value of 1302 above to other sound ID.

List of SystemSoundIDs
https://github.com/TUNER88/iOSSystemSoundsLibrary

Trying to compile using the remote build server the following error is generated:

Error: ** BUILD FAILED **
The following build commands failed:
CompileC build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/b4i_main.o B4iProject/b4i_main.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
 

aeric

Well-Known Member
Licensed User
How about debug mode?
 
Top