mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 08:52:44 +00:00 
			
		
		
		
	 49e6414c58
			
		
	
	
		49e6414c58
		
	
	
	
	
		
			
			- Fills out both IDLs and implements some basic attributes/methods. - No actual audio processing yet though :^)
		
			
				
	
	
		
			31 lines
		
	
	
	
		
			1.3 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
	
		
			1.3 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
| #import <WebAudio/BaseAudioContext.idl>
 | |
| 
 | |
| // https://www.w3.org/TR/webaudio/#enumdef-audiocontextlatencycategory
 | |
| enum AudioContextLatencyCategory { "balanced", "interactive", "playback" };
 | |
| 
 | |
| // https://webaudio.github.io/web-audio-api/#AudioContext
 | |
| [Exposed=Window]
 | |
| interface AudioContext : BaseAudioContext {
 | |
|     constructor(optional AudioContextOptions contextOptions = {});
 | |
|     readonly attribute double baseLatency;
 | |
|     readonly attribute double outputLatency;
 | |
|     AudioTimestamp getOutputTimestamp ();
 | |
|     Promise<undefined> resume ();
 | |
|     Promise<undefined> suspend ();
 | |
|     Promise<undefined> close ();
 | |
|     // FIXME: MediaElementAudioSourceNode createMediaElementSource (HTMLMediaElement mediaElement);
 | |
|     // FIXME: MediaStreamAudioSourceNode createMediaStreamSource (MediaStream mediaStream);
 | |
|     // FIXME: MediaStreamTrackAudioSourceNode createMediaStreamTrackSource (MediaStreamTrack mediaStreamTrack);
 | |
|     // FIXME: MediaStreamAudioDestinationNode createMediaStreamDestination ();
 | |
| };
 | |
| 
 | |
| dictionary AudioContextOptions {
 | |
|   AudioContextLatencyCategory latencyHint = "interactive";
 | |
|   float sampleRate;
 | |
| };
 | |
| 
 | |
| dictionary AudioTimestamp {
 | |
|   double contextTime;
 | |
|   // FIXME: Should be DOMHighResTimeStamp, but DOMHighResTimeStamp doesn't get parsed as a double during codegen
 | |
|   double performanceTime;
 | |
| };
 |