Re: On Memory Management & MusicSequence
Re: On Memory Management & MusicSequence
- Subject: Re: On Memory Management & MusicSequence
- From: Daniel Jalkut <email@hidden>
- Date: Mon, 9 Feb 2004 16:34:15 -0800
Thanks, Bill. So the sequence doesn't take ownership of the AUGraph
(or whatever target) it's aimed at. Is it safe to assume in general
that "setter" type APIs don't take ownership? I was hoping for some
kind of genera rule of thumb to keep things sane. I assume that things
like "AUGraphCreateNode
You list "remove the graph from the sequence" as one of the steps to do
before disposing of the graph, but as far as I can tell the only way to
do this is to replace it with another graph (SetAUGraph again). So
what do I pass if I want to clean up properly without setting a new
graph in its place? Can I pass NULL to SetAUGraph? Same question for
SetMIDIEndpoint ?
It turns out my worst bug was in fact a "didn't stop playing the
sequence" bug. To anybody who's reading this before venturing into
MusicPlayer - always stop playing the sequence! Crazy stuff will
happen to the new AUGraph if you try to switch the AUGraph before
stopping.
Thanks again,
Daniel
On Feb 9, 2004, at 12:42 PM, William Stewart wrote:
You better not dispose of a graph that is in use by a sequence. So,
you'd have to:
Stop playing the sequence
remove the sequence from the player (if you're disposing the graph,
its sequence is unplayable)
Remove the graph from the sequence
dispose the graph
_______________________________________________
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.