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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:32:00+00:00 2026-06-03T03:32:00+00:00

I am making an Augmented Reality application that has picture taking functionality. It uses

  • 0

I am making an Augmented Reality application that has picture taking functionality. It uses a custom function of mine to create a UIImage to save the screen. By law in Japan, cameras must have a shutter noise, which is why the iPhone camera always plays it. So far I have found a way to play sounds even when the iPhone is muted but it still relies on the user set volume. So I found a way using MPMusicPlayerController to control the application volume. This works, but when the volume is changed a box pops up signaling that the volume was changed.

Here is my code to play sounds even when muted:

    AudioSessionInitialize (NULL, NULL, NULL, NULL);
AudioSessionSetActive(true);

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

I use the library Finch to play the sound (a light wrapper for openAL) and then MPMusicPlayerController to adjust the volume before play.

appMusicPlayer = [MPMusicPlayerController applicationMusicPlayer];
[appMusicPlayer setVolume:0.5f];

Anyone have experience with this or have made apps like this for Japan? I’m really at a loss. 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-06-03T03:32:01+00:00Added an answer on June 3, 2026 at 3:32 am

    The MPVolumeView will, while visible, block the floating box, even if the user can’t actually see it.

    Some sample code…

    // create/synthesize ivars for "MPVolumeView" and "UIView" (both are necessary)
    // I called them "mpVolumeView" and "mpVolumeViewParentView" respectively
    
    // the UIView containing the MPVolumeView can have a frame of (0,0,1,1)
    // this way, the user never sees the slider, but it still works normally
    
    - (void)viewDidLoad {
        ...
        // with this, only the slider is visible
        mpVolumeViewParentView.backgroundColor = [UIColor clearColor];
    
        // initialize the volume slider (link the parent view in IB, or init here)
        mpVolumeView = [[MPVolumeView alloc] initWithFrame:
                                                    mpVolumeViewParentView.bounds];
    
        // since it's a programmatic init, the subview must be added like so
        [mpVolumeViewParentView addSubview:mpVolumeView];
    
        // allows the floating box to appear without destroying mpVolumeView
        mpVolumeView.hidden = YES; // or [mpVolume setHidden:YES]; if you prefer
        ...
    }
    

    Before changing volume to force the camera to make sound…

    mpVolumeView.hidden = NO; // view visible, box doesn't appear
    

    And after sounds, so it doesn’t look like you messed with anything…

    mpVolumeView.hidden = YES; // view hidden, box appears
    

    It might take some tweaking to get what you want, but it should be a good starting point.

    This code is for iOS 5.1
    I don’t know what the compatibility is with older versions.

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

Sidebar

Related Questions

Making an Flex App. Just wondering if anyone has created something that fits automatically
Making a small WCF test program which is based on a Store that has
Making my PHP Command line application support Linux and Windows. Currently it has this
I'm making something like an augmented reality app, in which I have an OpenGL
Making an adobe flex ui in which data that is calculated must use proprietary
Making UML sequence diagram in VS 2010RC I've observed that there is no activation
Making websites that appear correctly in IE is a big problem. Is there any
While making some final tests of a class-library that I'm writing for Windows Mobile
Im making a login/logout class that logs users in, sets cookies based on user's
Im making firefox extension. One function stores value in every tab, to use it

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.