iOS Question Sound record problem.

Discussion in 'iOS Questions' started by Wave, Dec 28, 2018.

  1. Wave

    Wave Member Licensed User

    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

    Code:
    audioRec.Initialize(File.DirDocuments, "test.mp4"44100True16True)
    audioRec.Record
    Play Code

    Code:
    vv.Initialize("vm")
    vv.LoadVideo(
    File.DirDocuments, "test.mp4")
    vv.Play
    thank you all.
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    You can use MediaPlayer to play it. It will allow you to change the volume.
     
  3. Wave

    Wave Member Licensed User

    thank for answer. but problem is continue. maybe problem is audioRecord object.
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    You need to set the audio session each time after you finish recording.

    Code:
    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
     
  5. Wave

    Wave Member Licensed User

    thank you for my solving the problem erel. now very well working.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice