mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 14:52:43 +00:00 
			
		
		
		
	 759e07579e
			
		
	
	
		759e07579e
		
	
	
	
	
		
			
			https://developer.apple.com/documentation/audiounit Apple has a number of audio frameworks we could use. This uses the Audio Unit framework, as it gives us most control over the rendering of the audio frames (such as being able to quickly pause / discard buffers). From some reading, we could implement niceties such as fading playback in and out while seeking over a short (10ms) period. This patch does not implement such fancy features though. Co-Authored-By: Andrew Kaster <akaster@serenityos.org>
		
			
				
	
	
		
			51 lines
		
	
	
	
		
			1.3 KiB
		
	
	
	
		
			CMake
		
	
	
	
	
	
			
		
		
	
	
			51 lines
		
	
	
	
		
			1.3 KiB
		
	
	
	
		
			CMake
		
	
	
	
	
	
| set(SOURCES
 | |
|     GenericTypes.cpp
 | |
|     SampleFormats.cpp
 | |
|     Loader.cpp
 | |
|     RIFFTypes.cpp
 | |
|     WavLoader.cpp
 | |
|     FlacLoader.cpp
 | |
|     FlacWriter.cpp
 | |
|     WavWriter.cpp
 | |
|     Metadata.cpp
 | |
|     MP3Loader.cpp
 | |
|     PlaybackStream.cpp
 | |
|     QOALoader.cpp
 | |
|     QOATypes.cpp
 | |
|     UserSampleQueue.cpp
 | |
|     VorbisComment.cpp
 | |
| )
 | |
| 
 | |
| if (SERENITYOS)
 | |
|     list(APPEND SOURCES ConnectionToServer.cpp)
 | |
|     list(APPEND SOURCES ConnectionToManagerServer.cpp)
 | |
|     list(APPEND SOURCES PlaybackStreamSerenity.cpp)
 | |
|     set(GENERATED_SOURCES
 | |
|         ../../Services/AudioServer/AudioClientEndpoint.h
 | |
|         ../../Services/AudioServer/AudioServerEndpoint.h
 | |
|         ../../Services/AudioServer/AudioManagerClientEndpoint.h
 | |
|         ../../Services/AudioServer/AudioManagerServerEndpoint.h
 | |
|     )
 | |
| endif()
 | |
| 
 | |
| if (HAVE_PULSEAUDIO)
 | |
|     list(APPEND SOURCES
 | |
|         PlaybackStreamPulseAudio.cpp
 | |
|         PulseAudioWrappers.cpp
 | |
|     )
 | |
| endif()
 | |
| 
 | |
| serenity_lib(LibAudio audio)
 | |
| target_link_libraries(LibAudio PRIVATE LibCore LibIPC LibThreading LibUnicode LibCrypto)
 | |
| 
 | |
| if (HAVE_PULSEAUDIO)
 | |
|     target_link_libraries(LibAudio PRIVATE pulse)
 | |
|     target_compile_definitions(LibAudio PRIVATE HAVE_PULSEAUDIO=1)
 | |
| endif()
 | |
| 
 | |
| if (APPLE)
 | |
|     target_sources(LibAudio PRIVATE PlaybackStreamAudioUnit.cpp)
 | |
| 
 | |
|     find_library(AUDIO_UNIT AudioUnit REQUIRED)
 | |
|     target_link_libraries(LibAudio PRIVATE ${AUDIO_UNIT})
 | |
| endif()
 |