Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4337916
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T11:00:38+00:00 2026-05-21T11:00:38+00:00

In my application, when the app starts, I’m playing an introduction video. Later in

  • 0

In my application, when the app starts, I’m playing an introduction video. Later in the application, I’m playing some audio files on click of buttons. But the audio is not playing well. Its muffling and some times low audio etc problem are noticed.

I found the bug is with playing video. When I’m not playing the introduction video, the audio is playing well. else it is causing trouble.

I’m using the following code to set up movie player:

-(void)setupMovie
{
    NSString* moviePath;
    if ([[UIDevice currentDevice] userInterfaceIdiom] ==  UIUserInterfaceIdiomPad)
    {
        moviePath = [[NSBundle mainBundle] pathForResource:@"ipad" ofType:@"3gp"];
    }
    else 
    {
        moviePath = [[NSBundle mainBundle] pathForResource:@"iphone" ofType:@"3gp"];    

    }

    NSURL* movieURL = [NSURL fileURLWithPath:moviePath];
    playerCtrl =  [[MPMoviePlayerController alloc] initWithContentURL:movieURL];

    if ([[UIDevice currentDevice] userInterfaceIdiom] ==  UIUserInterfaceIdiomPad)
    {
        playerCtrl.view.frame = CGRectMake(0, 0, 1024, 768);
    }
    else 
    {
        playerCtrl.view.frame = CGRectMake(0, 0, 480, 320);     
    }


    playerCtrl.scalingMode = MPMovieScalingModeFill;
    playerCtrl.controlStyle = MPMovieControlStyleNone;
    [playerCtrl prepareToPlay];

    [[NSNotificationCenter defaultCenter] addObserver:self 
                                             selector:@selector(moviePlayerLoadStateChanged:) 
                                                 name:MPMoviePlayerLoadStateDidChangeNotification 
                                               object:nil];

    [[NSNotificationCenter defaultCenter] addObserver:self 
                                             selector:@selector(moviePlayBackDidFinish:) 
                                                 name:MPMoviePlayerPlaybackDidFinishNotification 
                                               object:nil];
}

- (void) moviePlayerLoadStateChanged:(NSNotification*)notification 
{
    if ([playerCtrl loadState] != MPMovieLoadStateUnknown)
    {
        [[NSNotificationCenter  defaultCenter] removeObserver:self 
                                                         name:MPMoviePlayerLoadStateDidChangeNotification 
                                                       object:nil];



        // Play the movie
        [self.view addSubview:playerCtrl.view];
        [playerCtrl play];

        [[NSNotificationCenter defaultCenter] postNotificationName:@"GSPLAYER_STARTED" object:nil];
    }
    else 
    {
        NSLog(@"Player received unknown error");
        [[NSNotificationCenter defaultCenter] postNotificationName:@"GSPLAYER_ERROR" object:nil];
    }
}

When movie finishes, I’m loading next view as follows:

-(void)playerCompleted
{
    [pv.view removeFromSuperview];
    [pv release];
    pv = nil;
    [self.window addSubview:navigationController.view];
}

The following code is to play audio:

-(void)playAudio:(NSString*)filename
{
    self.allowAnimation = NO;
    NSString* bundleName = [[NSBundle mainBundle] pathForResource:[filename lowercaseString] ofType:nil];

    //NSURL* url = [[NSURL alloc] initFileURLWithPath: bundleName];
    NSURL* url = [NSURL fileURLWithPath:bundleName];

    if (appSoundPlayer) {
        [appSoundPlayer release];
    }

    appSoundPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:url error: nil];
    //[appSoundPlayer prepareToPlay];
    [appSoundPlayer setVolume: 1.0];
    [appSoundPlayer setDelegate: self];
    [appSoundPlayer play];  
}

Has someone came across such issues earlier? What might be the problem and what will be the solution?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T11:00:39+00:00Added an answer on May 21, 2026 at 11:00 am

    The problem is with the video codec.
    If we are using 3GP not having AAC format, there’s some issue with Apple framework itself. I contacted Apple and they accepted it as a bug.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

App works fine in android 3.2 but not in android 3.1 My application is
I've redirected the logcat to file in my code when my app starts. But
I m working on an auto start application. In my application when app starts
I have a WCF application that requires some app initialization code to fire when
whem my app starts for the first time I need to copy some (
I've little knowledge in developing Mac window based application. When the app starts up,
I'm writing an application with a main window that's displayed when the app starts.
I have created an application.in the app i start a countdown timer and save
I have a C# app which invokes an unmanaged C++ application via Process.Start() On
I've never done a Java Web start application before. I wrote my app's JNLP

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.