mirror of
				https://git.suyu.dev/suyu/suyu
				synced 2025-11-04 00:49:02 -06:00 
			
		
		
		
	oboe_sink: handle temporary stream creation failure
This commit is contained in:
		@@ -67,9 +67,13 @@ public:
 | 
			
		||||
        oboe::AudioStreamBuilder builder;
 | 
			
		||||
 | 
			
		||||
        const auto result = ConfigureBuilder(builder, direction)->openStream(temp_stream);
 | 
			
		||||
        ASSERT(result == oboe::Result::OK);
 | 
			
		||||
        if (result == oboe::Result::OK) {
 | 
			
		||||
            return temp_stream->getChannelCount() >= 6 ? 6 : 2;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return temp_stream->getChannelCount() >= 6 ? 6 : 2;
 | 
			
		||||
        LOG_ERROR(Audio_Sink, "Failed to open {} stream. Using default channel count 2",
 | 
			
		||||
                  direction == oboe::Direction::Output ? "output" : "input");
 | 
			
		||||
        return 2;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
protected:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user