Spaces:
				
			
			
	
			
			
		Runtime error
		
	
	
	
			
			
	
	
	
	
		
		
		Runtime error
		
	File size: 477 Bytes
			
			| 6bcb42f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | export default class MockAudioBufferPlayer {
    constructor (samples, sampleRate) {
        this.samples = samples;
        this.sampleRate = sampleRate;
        this.buffer = {
            getChannelData: jest.fn(() => samples),
            sampleRate: sampleRate
        };
        this.play = jest.fn((trimStart, trimEnd, onUpdate) => {
            this.onUpdate = onUpdate;
        });
        this.stop = jest.fn();
        MockAudioBufferPlayer.instance = this;
    }
}
 | 
