921 |
* fading down the volume level to avoid clicks and regular processing |
* fading down the volume level to avoid clicks and regular processing |
922 |
* until the kill event actually occured! |
* until the kill event actually occured! |
923 |
* |
* |
924 |
* @see Kill() |
* If it's necessary to know when the voice's disk stream was actually |
925 |
|
* deleted, then one can set the optional @a bRequestNotification |
926 |
|
* parameter and this method will then return the handle of the disk |
927 |
|
* stream (unique identifier) and one can use this handle to poll the |
928 |
|
* disk thread if this stream has been deleted. In any case this method |
929 |
|
* will return immediately and will not block until the stream actually |
930 |
|
* was deleted. |
931 |
|
* |
932 |
|
* @param bRequestNotification - (optional) whether the disk thread shall |
933 |
|
* provide a notification once it deleted |
934 |
|
* the respective disk stream |
935 |
|
* (default=false) |
936 |
|
* @returns handle to the voice's disk stream or @c Stream::INVALID_HANDLE |
937 |
|
* if the voice did not use a disk stream at all |
938 |
|
* @see Kill() |
939 |
*/ |
*/ |
940 |
void Voice::KillImmediately() { |
Stream::Handle Voice::KillImmediately(bool bRequestNotification) { |
941 |
|
Stream::Handle hStream = Stream::INVALID_HANDLE; |
942 |
if (DiskVoice && DiskStreamRef.State != Stream::state_unused) { |
if (DiskVoice && DiskStreamRef.State != Stream::state_unused) { |
943 |
pDiskThread->OrderDeletionOfStream(&DiskStreamRef); |
pDiskThread->OrderDeletionOfStream(&DiskStreamRef, bRequestNotification); |
944 |
|
hStream = DiskStreamRef.hStream; |
945 |
} |
} |
946 |
Reset(); |
Reset(); |
947 |
|
return hStream; |
948 |
} |
} |
949 |
|
|
950 |
/** |
/** |