P Phil Thompson Member Licensed User Longtime User Nov 12, 2024 #1 Waiting for debugger to connect... Program started. java.lang.NoClassDefFoundError: android/media/AudioTrack at anywheresoftware.b4a.audio.Beeper.Initialize2(Beeper.java:54) at anywheresoftware.b4a.audio.Beeper.Initialize(Beeper.java:37) at phil.timeclock.b4xmainpage._initialize(b4xmainpage.java:2089) at phil.timeclock.b4xpagesmanager._initialize(b4xpagesmanager.java:112) at phil.timeclock.main._appstart(main.java:104) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:629) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:237) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:167) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Waiting for debugger to connect... Program started. java.lang.NoClassDefFoundError: android/media/AudioTrack at anywheresoftware.b4a.audio.Beeper.Initialize2(Beeper.java:54) at anywheresoftware.b4a.audio.Beeper.Initialize(Beeper.java:37) at phil.timeclock.b4xmainpage._initialize(b4xmainpage.java:2089) at phil.timeclock.b4xpagesmanager._initialize(b4xpagesmanager.java:112) at phil.timeclock.main._appstart(main.java:104) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:629) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:237) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:167) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
P Phil Thompson Member Licensed User Longtime User Nov 12, 2024 #2 OOPS! I intended to add text above the preceding error text. This was generated when I added the audio library and followed the instruction of use for B4J Audio library was updated and it now supports generating "beep" sounds. B4X: Dim b As Beeper b.Initialize(300, 500) '300 milliseconds, 500 hz b.Beep Once the object is initialized you can reuse it and play it multiple times. Documentation: http://www.b4x.com/android/help/audio.html Installation instructions: - Download the attached file. - Copy both files to the internal libraries folder: C:\Program Files\Anywhere Software\Basic4android\Libraries Upvote 0
OOPS! I intended to add text above the preceding error text. This was generated when I added the audio library and followed the instruction of use for B4J Audio library was updated and it now supports generating "beep" sounds. B4X: Dim b As Beeper b.Initialize(300, 500) '300 milliseconds, 500 hz b.Beep Once the object is initialized you can reuse it and play it multiple times. Documentation: http://www.b4x.com/android/help/audio.html Installation instructions: - Download the attached file. - Copy both files to the internal libraries folder: C:\Program Files\Anywhere Software\Basic4android\Libraries
Erel B4X founder Staff member Licensed User Longtime User Nov 13, 2024 #3 B4A Audio library will not work with B4J. For a "standard" beep: https://www.b4x.com/android/forum/threads/generate-beep-on-a-desktop.135209/post-855115 And you might be able to create a custom beep with this: https://www.b4x.com/android/forum/threads/b4j-jaudiotrack2.142197/ Code to create the beep data is available here: https://www.b4x.com/android/forum/threads/audio-library-beeper-duration.78712/#post-498840 (intended for B4A AudioStreamer but might still be useful). Upvote 0
B4A Audio library will not work with B4J. For a "standard" beep: https://www.b4x.com/android/forum/threads/generate-beep-on-a-desktop.135209/post-855115 And you might be able to create a custom beep with this: https://www.b4x.com/android/forum/threads/b4j-jaudiotrack2.142197/ Code to create the beep data is available here: https://www.b4x.com/android/forum/threads/audio-library-beeper-duration.78712/#post-498840 (intended for B4A AudioStreamer but might still be useful).
P Phil Thompson Member Licensed User Longtime User Nov 15, 2024 #4 Erel said: B4A Audio library will not work with B4J. For a "standard" beep: https://www.b4x.com/android/forum/threads/generate-beep-on-a-desktop.135209/post-855115 And you might be able to create a custom beep with this: https://www.b4x.com/android/forum/threads/b4j-jaudiotrack2.142197/ Code to create the beep data is available here: https://www.b4x.com/android/forum/threads/audio-library-beeper-duration.78712/#post-498840 (intended for B4A AudioStreamer but might still be useful). Click to expand... OK... Will look at other options. This surprised me though when you said it would not work with B4J Upvote 0
Erel said: B4A Audio library will not work with B4J. For a "standard" beep: https://www.b4x.com/android/forum/threads/generate-beep-on-a-desktop.135209/post-855115 And you might be able to create a custom beep with this: https://www.b4x.com/android/forum/threads/b4j-jaudiotrack2.142197/ Code to create the beep data is available here: https://www.b4x.com/android/forum/threads/audio-library-beeper-duration.78712/#post-498840 (intended for B4A AudioStreamer but might still be useful). Click to expand... OK... Will look at other options. This surprised me though when you said it would not work with B4J
teddybear Well-Known Member Licensed User Nov 16, 2024 #5 The Audio library is not included in the B4J installer, I guess someone has put it into the internal folder Upvote 0
The Audio library is not included in the B4J installer, I guess someone has put it into the internal folder