Audio Output: Made converter cleanup atomic, to wait on any threads that are still running
parent
106eb587b4
commit
1cc34ea7d4
|
@ -557,11 +557,6 @@ static float db_to_scale(float db)
|
||||||
- (void)inputFormatDidChange:(AudioStreamBasicDescription)format
|
- (void)inputFormatDidChange:(AudioStreamBasicDescription)format
|
||||||
{
|
{
|
||||||
DLog(@"FORMAT CHANGED");
|
DLog(@"FORMAT CHANGED");
|
||||||
stopping = YES;
|
|
||||||
while (convertEntered || ACInputEntered || ACFloatEntered)
|
|
||||||
{
|
|
||||||
usleep(500);
|
|
||||||
}
|
|
||||||
[self cleanUp];
|
[self cleanUp];
|
||||||
[self setupWithInputFormat:format outputFormat:outputFormat];
|
[self setupWithInputFormat:format outputFormat:outputFormat];
|
||||||
}
|
}
|
||||||
|
@ -575,6 +570,11 @@ static float db_to_scale(float db)
|
||||||
|
|
||||||
- (void)cleanUp
|
- (void)cleanUp
|
||||||
{
|
{
|
||||||
|
stopping = YES;
|
||||||
|
while (convertEntered || ACInputEntered || ACFloatEntered)
|
||||||
|
{
|
||||||
|
usleep(500);
|
||||||
|
}
|
||||||
rgInfo = nil;
|
rgInfo = nil;
|
||||||
if (converterFloat)
|
if (converterFloat)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue