Volume with AVSystemController

Discussion in 'iOS Development' started by gojohnnyboi, Jun 3, 2008.

  1. gojohnnyboi

    gojohnnyboi Well-Known Member

    Joined:
    Jan 25, 2008
    Messages:
    3,339
    Likes Received:
    55
    Ok, so i was messing around with Celestial today, and when looking upon the header for AVSystemController, i found something that caught my eye, a volume setting method. So, i whipped up a quick little test app with a slider to test my theory.


    It works!, shows the HUD and everything(which can easily be disabled with a bool, in the UIApplication header), but my problem is determining the CURRENT volume.

    Anyone know the code to return the current volume of the device, like PocketTouch does (i think) in the top right?
  2. SkylarEC

    SkylarEC Super Moderator Emeritus Staff Member

    Joined:
    Sep 19, 2007
    Messages:
    6,642
    Likes Received:
    129
    First you're asking for the brightness, now you're trying to control the volume. I am curious as to what you are trying to make. It sounds like you're trying to make a clone of my app...
  3. gojohnnyboi

    gojohnnyboi Well-Known Member

    Joined:
    Jan 25, 2008
    Messages:
    3,339
    Likes Received:
    55

    As far as i knew, your application didn't control brightness...And i'm trying to learn new things. Notice i haven't released an app in quite some time? I bought NerveGas' book the other day, and i've been hitting it hard. I'm making sample apps on how to do things to learn more, as you suggested I do at an earlier date. Nothing involving the information needed here on ipodtouchfans will be put into an application, for public release.


    However, i've seen the brightness question again and again, how it doesn't work for people, but i think i may just have to have a UISliderControl range a HUGE value span, so that i can test that theory.

    But please, the information is highly appreciated.
  4. SkylarEC

    SkylarEC Super Moderator Emeritus Staff Member

    Joined:
    Sep 19, 2007
    Messages:
    6,642
    Likes Received:
    129
    There are three different ways to control the brightness. To control that, use the C functions (*hint*).

    And for the record, brightness was one of the first things I added to PocketTouch. You know, it's AutoDim feature,
  5. God__

    God__ New Member

    Joined:
    Dec 23, 2007
    Messages:
    69
    Likes Received:
    0
    To elaborate, only one of those three methods will work, the one Skylar is hinting at.

    Edit: And I can only presume he is hinting so that you have to find out and learn yourself. After all, it isn't quite the same if all your answers are fed to you. So I also won't tell you how to do this.

Share This Page