开发者

QTKit audio mute and Stream Buffering status message

开发者 https://www.devze.com 2023-02-05 04:34 出处:网络
I\'m muting volume in QTkit like this: if 开发者_运维问答([muteButton state] == NSOnState){ [mMovieVolumeSlider setFloatValue:0.1];

I'm muting volume in QTkit like this:

if
         开发者_运维问答   ([muteButton state] == NSOnState){


    [mMovieVolumeSlider setFloatValue:0.1];
    [testMovie setVolume:0.1];

The problem is the volume attenuation is sudden and abrupt. How can I implement a fade effect to the volume attenuation?

Also - my app runs .pls audio stream files. I have the .pls files embedded in the bundle. When selecting a stream within the app, a short delay is common before the stream begins to play. I want to display some sort of status message ("Buffering" or Connecting") during this short delay prior to connecting. When the stream begins the status message would end. Any idea's on how to approach this?

thanks for the help.

-paul.


I'll just outline my answers to your two questions as suggestions:

  1. What you want to accomplish sounds much like a good fit for NSAnimation (either through subclassing or delegation — animation:valueForProgress: will probably be your friend here).
  2. Open the QTMovie asynchronously and listen for the QTMovieLoadStateDidChangeNotification.

HTH

Daniel

0

精彩评论

暂无评论...
验证码 换一张
取 消