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 6852717
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:25:34+00:00 2026-05-27T01:25:34+00:00

i have an app always working till i have installed ios5 on device. this

  • 0

i have an app always working till i have installed ios5 on device.
this is the code.

UInt32 sessionCategory = kAudioSessionCategory_MediaPlayback;
    AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(sessionCategory), &sessionCategory);    
    UInt32 audioRouteOverride = kAudioSessionOverrideAudioRoute_Speaker;
    AudioSessionSetProperty (kAudioSessionProperty_OverrideAudioRoute,sizeof (audioRouteOverride),&audioRouteOverride);

    //NSLog(@"url");
    NSURL *url = [NSURL fileURLWithPath:@"/dev/null"];
    //NSLog(@"dizionario");
    NSDictionary *audioSettings = [NSDictionary dictionaryWithObjectsAndKeys:
                                   [NSNumber numberWithFloat: 44100.0],                 AVSampleRateKey,
                                   [NSNumber numberWithInt: kAudioFormatAppleLossless], AVFormatIDKey,
                                   [NSNumber numberWithInt: 1],                         AVNumberOfChannelsKey,
                                   [NSNumber numberWithInt: AVAudioQualityMax],         AVEncoderAudioQualityKey,
                                   nil];
    NSError *error;    
    bool b;


    //NSLog(@"audio");
    recorder = [[AVAudioRecorder alloc] initWithURL:url settings:audioSettings error:&error];
    //NSLog(@"audio");
    if (recorder) {
        //NSLog(@"prepara");
        b=[recorder prepareToRecord];
        //NSLog(@"%@",(b ? @"OK" : @"NO"));
        //NSLog(@"meter");
        recorder.meteringEnabled = YES;
        //NSLog(@"recorder");
        b=[recorder record];
        //NSLog(@"%@", (b ? @"OK" : @"NO"));            
        //        NSLog(@"leveltimer");
        //        levelTimer = [NSTimer scheduledTimerWithTimeInterval: 0.03 target: self selector: @selector(levelTimerCallback:) userInfo: nil repeats: YES];
    } else {
        NSLog(@"************** ERRORE: ****************");
        NSLog([error description]);    
    }

the result is that recorder record silence, no peak power, no avarage power.
i use xcode4 (ios inxcode4 is till 4.3, i have not downloaded the latest xcode)
why in ios5 doesn’t work anymore?
is not compatible?
thanks

  • 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-27T01:25:34+00:00Added an answer on May 27, 2026 at 1:25 am

    i have downloaded the latest xcode, tryed

    Documents or Cache instead of /dev/null but no luck

    i have solved but don’t know why it stopped working.

    the code above was putted in a singleton class loaded and initialized once at start of the app.

    seems that records only one voice power then stops (even if i have controlled that recording=true, metering enabled=true ecc…in logs)

    now i have putted the same code in a method of the singleton class and called that method from the file of the screen “ingame” and works…

    mmm…….any ideas why it happens?

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

Sidebar

Related Questions

Hi so I'm working on an app and at the moment I have code
Hi i'm working on an android app and this is my problem I have
I have an app where there is always a current contest (defined by start_date
Guys, I have a basic WPF application. Contains App.xaml as always and a Mainwindow.xaml.
I have recently started working on an app which has both Java and native
Im working on a bulk email sending app and have a page with a
I am working on pinging app in which I have a progress bar which
I have an iOS app working and am trying to clean up some of
So I have a very simple app I am working on. It's purpose is
I am working on a Silverlight app at the moment. I have a few

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.