mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 10:22:45 +00:00 
			
		
		
		
	 50c73d02f0
			
		
	
	
		50c73d02f0
		
	
	
	
	
		
			
			This will ensure that we don't leak any memory while playing back audio. There is an expectation value in the test that is only set to true when PulseAudio is present for the moment. When any new implementation is added for other libraries/platforms, we should hopefully get a CI failure due to unexpected success in creating the `PlaybackStream`. To ensure that we clean up our PulseAudio connection whenever audio output is not needed, add `PulseAudioContext::weak_instance()` to allow us to check whether an instance exists without creating one.
		
			
				
	
	
		
			10 lines
		
	
	
	
		
			252 B
		
	
	
	
		
			CMake
		
	
	
	
	
	
			
		
		
	
	
			10 lines
		
	
	
	
		
			252 B
		
	
	
	
		
			CMake
		
	
	
	
	
	
| set(TEST_SOURCES
 | |
|     TestFLACSpec.cpp
 | |
|     TestPlaybackStream.cpp
 | |
| )
 | |
| 
 | |
| foreach(source IN LISTS TEST_SOURCES)
 | |
|     serenity_test("${source}" LibAudio LIBS LibAudio)
 | |
| endforeach()
 | |
| 
 | |
| install(DIRECTORY ${FLAC_SPEC_TEST_PATH} DESTINATION usr/Tests/LibAudio/FLAC)
 |