🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.mac.programmer.codewarrior
1 messages
1 total messages Started by Steven Daedelus Wed, 30 Mar 2005 01:09
CallMeWhen problem
#376
Author: Steven Daedelus
Date: Wed, 30 Mar 2005 01:09
56 lines
2850 bytes
Howdy,

I'm trying to install a callback in a faceless quicktime app I'm 
developing in Codewarrior using Carbon. For the life of me I can't get 
it to work.

My playback code goes basically like this:

   EnterMovies();
   OpenMovieFile ( &myFileSpec, &myResRefNum, fsRdPerm );
   NewMovieFromFile ( &myMovie, myResRefNum, 0, NULL, newMovieActive, 
NULL );


Then I define the callback:

   myCallback = NewCallBack ( GetMovieTimeBase ( myMovie ), 
callBackAtExtremes );
   err = CallMeWhen ( myCallback, NewQTCallBackUPP 
(QTFinishedPlayingProc), NULL, triggerAtStop, 0, 0 );


And finally run the movie (its actually an audio file):

   StartMovie (myMovie);


Now, I'm doing most of the development on a command-line, then porting 
working code into my faceless app, so my callback, at the moment, looks 
like this:

pascal void QTFinishedPlayingProc ( QTCallBack cb, long refCon ) {
   printf("Callback reached: %d | %d", cb, refCon);
}


So I run the code. The movie plays and the callback never gets executed. 
I suspect it is because the program returns as soon as playback begins 
-- but supposedly OSX automatically runs MoviesTask, which makes sense, 
as the audio continues to the end, so I don't know about that. In any 
case I tried throwing in a MoviesTask loop, but it didn't make one whit 
of difference -- the callback still doesn't get executed.

I'm at my wit's end. This is the last hurdle I have to clear to finish 
the software, after which I can bill it and earn money with which to 
feed my daughter. So you see a lot is at stake. ;)

Any help appreciated.

sp

-- 
This sig property of the Soviet Union

-- 
This sig property of the Soviet Union
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads