• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSMovie/NSMovieView problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSMovie/NSMovieView problem


  • Subject: NSMovie/NSMovieView problem
  • From: Alex Fuller <email@hidden>
  • Date: Fri, 10 Jan 2003 18:28:55 +0000

I'm trying to enable the user to play sounds files from my Cocoa app by loading them into NSMovieViews, with little success. The original files are WAVs, but these should be loadable as QuickTime movies. I have tried:

1. Load WAV file directly using -initWithURL
Result: seems to load an empty movie - clicking the play button causes the playhead to jump straight to the end of the controller timeline bar.

2. Load WAV file as a Movie using QuickTime's OpenMovieFile() and NewMovieFromFile() toolbox functions, then wrap in NSMovie with -initWithMovie
Result: same as above. This is the method I would expect to work for certain since NewMovieFromFile() will convert most foreign formats in place transparently.

3. Load a .mov sound file (i.e. no video track) using either of the above methods
Result: as before.

4. For sanity test, load a .mov file with video and audio tracks
Results: video plays fine, but I can't hear any audio. At least the playhead doesn't shoot to the end of the controller.

All these files play fine if they're dropped on QuickTime Player by the way.

I am left with two problems:

- when using a nice standard video clip, I can't hear any audio. This seems really strange. I have added a sanity-check [theMovie setVolume:1.0] to make sure there should be volume, but nothing.

- when loading an audio-only QuickTime movie, NSMovie seems to think there's nothing there to play, as if it relies on a video track for its timing data.

Can anyone help?

Alex
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: NSMovie/NSMovieView problem
      • From: Alex Fuller <email@hidden>
  • Prev by Date: Using iconForFileType: to get an icon.
  • Next by Date: Re: Best beginner's book
  • Previous by thread: Using iconForFileType: to get an icon.
  • Next by thread: Re: NSMovie/NSMovieView problem
  • Index(es):
    • Date
    • Thread