Professional Web Applications Themes

NSMovieView volume - Mac Programming

Hello, I'm having a problem when dealing with my NSMovieView's volume. I'm trying to find out what the volume of the movie is with the [NSMovieView volume] call, which works fine if I set the volume myself using [NSMovieView setVolume], but if the user uses the small volume slider on the NSMovieView's movie controller, and I use [NSMovieView volume] it just returns what last I set it to (or 1 by default). When the users change the volume via the small volume control does this not set the movies volume? How can I retrieve the proper value? If I watch ...

  1. #1

    Default NSMovieView volume

    Hello,
    I'm having a problem when dealing with my NSMovieView's volume. I'm trying
    to find out what the volume of the movie is with the [NSMovieView volume]
    call, which works fine if I set the volume myself using [NSMovieView
    setVolume], but if the user uses the small volume slider on the
    NSMovieView's movie controller, and I use [NSMovieView volume] it just
    returns what last I set it to (or 1 by default).

    When the users change the volume via the small volume control does this not
    set the movies volume? How can I retrieve the proper value? If I watch the
    'setVolume' selector of my NSMovieView, it does not get called when the
    slider changes? How is this volume changed?

    Any ideas would be great.
    Thanks
    Ti

    Tim Guest

  2. #2

    Default Re: NSMovieView volume

    In article <BC3EE9B6.5E6E%org>,
    Tim R Johnson <org> wrote:
     

    If you're willing to deal with the QuickTime API, you could try
    GetMovieVolume(). That returns a short, though, which would probably be
    different from what NSMovieView's -volume returns.

    --
    Jesse Douglas
    com
    http://users.erols.com/tdouglas/
    Jesse Guest

  3. #3

    Default Re: NSMovieView volume

    Thanks for the advice. I had tried this before with the same problem.
    GetMovieVolume returns a short value usually between 1 and 255 (255 being
    mapped to the value 1 in [NSMovieView volume]). To convert the volume the
    short to the float I just divide it by 255. This returns the proper value
    and works great, except it didn't solve the problem I was having when the
    user changes the volume with the slider. After the user adjusts the volume,
    and I call GetMovieVolume or [NSMovieView volume], I always get what I last
    set it to using [NSMovieView setVolume] or SetMovieVolume. If I have not set
    it myself, GetMovieVolume will return the default volume (even if the user
    had changed it themselves).

    Thanks for the help though.
    Ti

    in article news.rcn.net, Jesse
    Douglas at com wrote on 1/29/04 8:25 PM:
     
    >
    > If you're willing to deal with the QuickTime API, you could try
    > GetMovieVolume(). That returns a short, though, which would probably be
    > different from what NSMovieView's -volume returns.[/ref]

    Tim Guest

  4. #4

    Default Re: NSMovieView volume

    In article <BC3FCF48.5E8F%org>,
    Tim R Johnson <org> wrote:
     

    Hmm. Why are you setting the volume programmatically? Would it be
    feasible to remove the volume slider from the movie controller and
    implement your own volume slider somewhere?

    --
    Jesse Douglas
    com
    http://users.erols.com/tdouglas/
    Jesse Guest

Similar Threads

  1. MP3 Volume
    By JKLea webforumsuser@macromedia.com in forum Macromedia Director Lingo
    Replies: 3
    Last Post: October 31st, 04:24 PM
  2. volume control
    By Syl in forum Windows XP/2000/ME
    Replies: 2
    Last Post: July 29th, 11:37 PM
  3. How to determine if a volume is a remote volume
    By Jhnny Fvrt (it means genetic antagonism) in forum Mac Programming
    Replies: 0
    Last Post: July 25th, 06:37 AM
  4. when volume changes a beep sounds at the new volume
    By Doug in forum Windows XP/2000/ME
    Replies: 0
    Last Post: July 12th, 08:39 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139