As anyone who has worked on the iPhone knows, issuing a sound alert comes with a price. If you use the standard QuickTime-esque Celestial audio controller to play your sounds, you'll stop any ongoing iPod or Video playback at once.
This past weekend, I spent time rummaging through the marvelous GraphicsServices framework and found this wee gem: GSEventPlaySoundAtPath.
When called with one argument, an NSString, the GraphicsServices call will play back that sound but not interrupt normal playback. So you can have your beep and your iPod too.
Unlike Celestial audio, there is no way to catch the end of the playback and the call runs in parallel. So keep you sounds short and if you need to wait for them to finish, use an NSTimer or an NSObject delay to pick up after the sound plays back.
Categories
Mac- tags:
- iphone development
- mac
Read More Entries by Erica Sadun.
Search
Stay Connected
Topics of Interest
- xray
- xp
- xml
- X11
- X,Troubleshooting,Freeware
- wwdc
- writing
- workshop
- workflow
- wishlist
- windows server 2008
- windows mobile
- windows 7
- windows
- wiki
- wii
- wifi problem
- wifi
- widlife
- weekly report
- webinar
- webcasting
- web services
- web
- waikiki
- WACOM
- voip
- voiceovers
- vmware fusion
- vmware
- visualhub
- visual thinking
- visual arts
- virus
- virtualization
- virtual synth
- video recording
- video production
- video casting
- video
- vector drawing
- utorrent
- utilities
- user interface
- usb headset
- usb harddrive
- usability
- upgrade
- update
- unix
- underexpose
- ui
- tv
- tsa
- troubleshooting
- tripod
- travel
- transcribe
- torrent
- tone
- tmobile g1
- tips and tricks
- time machine
- time exposure
- tim grey
- tiger
- the digital story
- the creative beat
- testing
- terminal
- temperature
- telephoto
- telecommuting
- tax
- tasmania
- synthesizers
- switchers
- surround sound
- sun light exposure
- studio recording
- studio
- store
- stop-motion
- stock
- statistics
- star trails
- stacking
- sql
- spiral
- special effects
- speakers
- spam
- sound effects
- sound design
- software distribution
- software
- social networking
- soap
- smartart
- smart homes
- slideshow
- skyscrapers
- skydrive
- silverlight
- Sierra
- shutter speed
- shortcuts
- sharpening
- sensor
- sensitivity
- security
- search engines
- sdmi
- sdk
- screencast
- scott kelby
- science
- scanner
- scale
- saturation
- san francisco
- safari
- ruby
- rss
- routine
- rick smolan
- rick sammon
- rich web services
- riaa
- ria
- review
- retouching
- restore
- remote desktop
- reflections
- redirect
- realnetworks
- reality
- rdc
- RAW
- raw
- quicktime
- python
- purchase
- publishing
- proofs
- programming
- productivity
- production
- process color
- process
- printing
- print on demand
- previews
- presentations
- preemie
- powerpoint 2008
- power
- post-processing
- portraits
- point reyes
- podcasting
- podcast
- pod
- plug-ins
- php
- photoshop world
- photoshop cs4 companion for photographers
- photoshop cs4
- Photoshop
- photoshop
- photoshoot
- photoplus
- Photomatix
- Photogrpahy
- photography business
- photography
- Photographing People
- photographers
- photogram
- photo workshops
- photo titles
- photo teaching
- photo schools
- photo production
- photo organizing
- photo narrative
- photo editing
- photo developing
- photo composition
- photo composite
- photgraphers
- phone
- perl
- performance
- penguins
- patterns
- parallels
- papau new guinea
- pantone
- palm os
- owl
- os x
- OS
- organize
- openoffice
- opendns
- open source
- online storage
- onlamp
- one-on-one
- olympics
- old media
- office live workspace
- office 2008
- office 2004
- office
- odbc
- obj-c
- ntfs
- nt
- notes
- noise
- nikon
- night photography
- night
- nicu
- newsletter
- news
- newbie
- new mexico
- new media
- Networking,IPv4,IPv6,Leopard,Troubleshooting,Routers
- networking
- nda
- nature photography
- nature
- namibia
- mysql
- music software
- music production
- music composition
- music
- Multiple Sclerosis
- multiple exposure
- MS
- mpaa
- mp3 player
- mp3
- movies
- mouse
- motion
- moon
- monochrome
- mongolia
- mongol
- mobile phone
- mobile
- missing sync
- MIDI
- midi
- microsoft windows
- microsoft office 2008
- microsoft office
- microsoft
- microphones
- micro blogging
- metamorphosis
- messenger
- memory cards
- media converter
- masking
- manuals
- malware
- make
- maine
- macworld
- macromedia
- macro lens
- macro
- macbook air
- mac software
- mac os x
- mac heist
- Mac
- mac
- luminance
- long exposure
- live mesh
- linux
- lightroom
- light
- lifechat
- licensing
- leopard
- lego mindstorms
- Las Vegas
- landscape
- LAB color
- korg
- keynote
- keyboard
- katrin eismann
- katie rose
- jxta
- jumping
- journal
- John Nack
- jobs
- jini
- jeff schewe
- javascript
- java
- january upgrade
- j2ee
- ixmf
- itunes
- italk
- isquint
- iso
- ipod touch
- ipod
- iphoto
- iphone development
- iphone 2
- iphone
- inversions
- interview
- internet broadcasting
- intellectual property
- Instruction
- instant messaging
- infrastructure
- industry
- indesign
- imposition
- image editing
- illustrator
- illusion
- ilife
- idisk
- ical
- ibm
- how-to
- honolulu
- holiday
- hobby
- history
- histogram
- high ISO
- high focal range
- hfr
- hexachrome
- hdr
- HDR
- hd still/video
- hd
- hawaii
- harold davis
- hardware
- hands
- hacks
- gtd
- greg gorman
- graphics
- grain
- grab shot
- government
- google android
- golden gate
- gimp
- gift
- geotagging
- games
- game audio
- game
- fusion
- fun
- ftp
- freeware
- formats
- focus stacking
- flowers
- flip4mac
- flip
- flickr
- Flickr
- flash
- fisheye lens
- firmware
- firefox
- filmmaking
- filemaker
- file transfer
- file sharing
- file management
- file compression
- fair use
- face to face
- exposure
- excel 2008
- excel
- evernote
- event
- Escher
- error
- equalizers
- environmental
- entourage
- entertainment
- encryption
- emergeny
- embedded
- electricity
- effects
- education
- editor
- dynamic range
- dvd
- dslr
- drums
- drma
- drm
- dot mac
- dome
- domains
- documentation
- dns
- dmca
- dma
- distribution models
- distributed
- digital slrs
- digital photography companion
- digital photography
- digital media
- digital imaging
- digital darkroom
- digital cameras
- development
- design
- derrick story
- dekepod
- deke
- dcma
- database
- data design
- d300
- cs4
- cross-processing
- creativity
- Creative Suite
- creative suite
- creative exposure
- corporate computing
- converter
- conversion
- content control
- content
- connectivity
- conference
- computer music
- composition
- composite
- command line
- color balance
- coldfusion
- coding
- code
- cocoa
- cmyk
- cloudy
- clone
- chiaroscuro
- cherry blossom
- cgi
- cd ripping
- canon
- cameras
- business
- budget
- bryan o'neil hughes
- browsers
- bridge
- books
- Book Passage
- book covers
- blurb
- bluetooth
- blogging
- blending modes
- black and white
- bittorrent
- birds
- birding
- big cats
- beta invitation
- beta
- bento
- beijing
- battery
- backup
- b&w monochrome conversion
- automator
- automation
- authors
- audio recording
- audio production
- audio mixing
- audio editing
- audio compression
- audio book
- audio
- art
- aqua
- appletv
- applescript
- applecare
- apple store
- apple
- app store
- api
- aperture
- apache
- aol
- anti-virus
- antaractica
- annoyances
- animation
- america at home
- airport
- air
- aim
- ai
- adobe
- adjustment layers
- address book
- actionscript
- 3d
- 100 views
- .net
- #vizthink09

Leave a comment