mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 13:12:46 +00:00 
			
		
		
		
	LibAudio: Added playback control features to audio server
LibAudio now supports pausing playback, clearing the buffer queue, retrieving the played samples since the last clear and retrieving the currently playing shared buffer id
This commit is contained in:
		
							parent
							
								
									e7ccbdbe30
								
							
						
					
					
						commit
						2f13517a1a
					
				
					 8 changed files with 109 additions and 9 deletions
				
			
		|  | @ -46,3 +46,23 @@ int AClientConnection::get_remaining_samples() | |||
| { | ||||
|     return send_sync<AudioServer::GetRemainingSamples>()->remaining_samples(); | ||||
| } | ||||
| 
 | ||||
| int AClientConnection::get_played_samples() | ||||
| { | ||||
|     return send_sync<AudioServer::GetPlayedSamples>()->played_samples(); | ||||
| } | ||||
| 
 | ||||
| void AClientConnection::set_paused(bool paused) | ||||
| { | ||||
|     send_sync<AudioServer::SetPaused>(paused); | ||||
| } | ||||
| 
 | ||||
| void AClientConnection::clear_buffer(bool paused) | ||||
| { | ||||
|     send_sync<AudioServer::ClearBuffer>(paused); | ||||
| } | ||||
| 
 | ||||
| int AClientConnection::get_playing_buffer() | ||||
| { | ||||
|     return send_sync<AudioServer::GetPlayingBuffer>()->buffer_id(); | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Till Mayer
						Till Mayer