Wave Member Licensed User Longtime User Dec 28, 2018 #1 Hi Guys, I have a little question. I making sound record application. but the sound is too low when I play it. Can you help with this. Record Code B4X: audioRec.Initialize(File.DirDocuments, "test.mp4", 44100, True, 16, True) audioRec.Record Play Code B4X: vv.Initialize("vm") vv.LoadVideo(File.DirDocuments, "test.mp4") vv.Play thank you all.
Hi Guys, I have a little question. I making sound record application. but the sound is too low when I play it. Can you help with this. Record Code B4X: audioRec.Initialize(File.DirDocuments, "test.mp4", 44100, True, 16, True) audioRec.Record Play Code B4X: vv.Initialize("vm") vv.LoadVideo(File.DirDocuments, "test.mp4") vv.Play thank you all.
Erel B4X founder Staff member Licensed User Longtime User Dec 30, 2018 #2 You can use MediaPlayer to play it. It will allow you to change the volume. Upvote 0
Wave Member Licensed User Longtime User Dec 30, 2018 #3 thank for answer. but problem is continue. maybe problem is audioRecord object. Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Dec 31, 2018 #4 You need to set the audio session each time after you finish recording. B4X: Sub SetAudioSession Dim no As NativeObject = Me no.RunMethod("setAudioSession", Null) End Sub #if OBJC #import <AVFoundation/AVFoundation.h> #import <AudioToolbox/AudioToolbox.h> - (void)setAudioSession { AVAudioSession *audioSession = [AVAudioSession sharedInstance]; NSError *err = nil; BOOL success = [audioSession setCategory:AVAudioSessionCategoryPlayback error:&err]; if (success) { success = [audioSession setActive:YES error:&err]; } if (!success) [NSException raise:@"" format:@"Error setting audio session: %@", err]; } #end if Upvote 0
You need to set the audio session each time after you finish recording. B4X: Sub SetAudioSession Dim no As NativeObject = Me no.RunMethod("setAudioSession", Null) End Sub #if OBJC #import <AVFoundation/AVFoundation.h> #import <AudioToolbox/AudioToolbox.h> - (void)setAudioSession { AVAudioSession *audioSession = [AVAudioSession sharedInstance]; NSError *err = nil; BOOL success = [audioSession setCategory:AVAudioSessionCategoryPlayback error:&err]; if (success) { success = [audioSession setActive:YES error:&err]; } if (!success) [NSException raise:@"" format:@"Error setting audio session: %@", err]; } #end if
Wave Member Licensed User Longtime User Dec 31, 2018 #5 thank you for my solving the problem erel. now very well working. Upvote 0