Re: MusicPlayerStart returns -10854
Re: MusicPlayerStart returns -10854
- Subject: Re: MusicPlayerStart returns -10854
- From: Christopher Corbell <email@hidden>
- Date: Wed, 29 Jan 2003 01:13:39 -0800
On Tuesday, January 28, 2003, at 04:19 PM, Michael Norris wrote:
Hi there,
Just getting into CoreAudio for the first time. I'm testing out the
MusicPlayer APIs (and lamenting over the poor state of documentation!)
I'm also attempting to put some Cocoa wrappers around them, just for
fun.
Anyway, at the moment, I'm not getting much joy with attempting to
play a MusicSequence. Here's the order of events (with arguments left
out):
NewMusicPlayer()
NewMusicSequence()
MusicSequenceNewTrack()
MusicTrackNewMIDINoteEvent() - add a single note with following
params: note:64 channel:0 velocity:128 duration:2.0 at time 0.0
MusicPlayerPreroll()
MusicPlayerStart()
All this works and no errors are returned *except* for the very last
call, MusicPlayerStart(), which returns an error of -10854. I have no
idea what this error means, as I can't seem to locate a header file
that explains these error codes. (Can anyone point me in this
direction?)
-10854 is defined in MusicPlayer.h, it's kAudioToolboxErr_NoSequence.
The call you're missing is MusicPlayerSetSequence(), which associates
the sequence
with the music player. (Just a tip: when I hit one of these error
codes I use the Find panel
in ProjectBuilder and set the search option to "This project,
frameworks only").
The MusicPlayer will create a default AUGraph with a DLSSynth and
output unit for you,
so that shouldn't be the problem.
As mentioned in a recent post there is a working C MusicPlayer sample,
it's called
AUViewTest and it's in Examples/CoreAudio/Services - it probably would
be easier
to find if it were more aptly named, something like
"MusicPlayerExample".
See the recent post "Re: MusicPlayer?" for more info.
Hope this helps,
Chris
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.