• 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
Re: sound advice
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sound advice


  • Subject: Re: sound advice
  • From: Matt Neuburg <email@hidden>
  • Date: Sat, 2 Feb 2002 10:18:53 -0800

On Sat, 2 Feb 2002 20:48:16 +1030, Nathan Day <email@hidden> said:

>
>I've been using NSSound, initWithContentsOfFile, play, and it works fine
>for me using the system sounds which are just aiff. Are your sounds some
>weird sample rate or something.

No, it's 44.1 16-bit mono. I am now going through an elaborate
song-and-dance where I preload the sound when the application starts up (so
that I don't search for it on disk with soundNamed every time I play it)
and then spawn the playing of it off into a separate thread; I'm hoping
this will avoid the reported crash (which I've never seen personally), and
it has improved the playing each time, I think, except the first time which
is still broken up. Is there something special about the first time a sound
is played? Gee this is a lot of work just to go "ding". m.

>
>On Saturday, February 2, 2002, at 04:53 PM, Matt Neuburg wrote:
>
>> What's the recommended way to play a sound? My sound is an aiff file in
>> my
>> bundle. I've been playing it with soundNamed and play, but the sound is
>> usually choppy and I've had reports that the app sometimes crashes. I've
>> tried preloading the sound file into memory as NSData and playing from
>> there, but the sound is still usually choppy, even though it's a very
>> short
>> sound. Should I be playing the sound in another thread? Any advice
>> appreciated - m.
>> --
>
>--__--__--
>
>Message: 8

--

matt neuburg, phd = email@hidden, http://www.tidbits.com/matt
pantes gar anthropoi tou eidenai oregontai phusei
Subscribe to TidBITS! It's free and smart. http://www.tidbits.com/


  • Follow-Ups:
    • Re: sound advice
      • From: John Nestor <email@hidden>
  • Prev by Date: How to use functions of Kernel.framework? (especially Blowfish)
  • Next by Date: Re: What's the easiest way to save users preferences
  • Previous by thread: Re: sound advice
  • Next by thread: Re: sound advice
  • Index(es):
    • Date
    • Thread