File tree Expand file tree Collapse file tree
shared-bindings/audiomixer Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5252//|
5353//| :param int voice_count: The maximum number of voices to mix
5454//| :param int buffer_size: The total size in bytes of the buffers to mix into
55- //| :param int channel_count: The maximum number of samples to mix at once
55+ //| :param int channel_count: The number of channels the source samples contain. 1 = mono; 2 = stereo.
5656//| :param int bits_per_sample: The bits per sample of the samples being played
5757//| :param bool samples_signed: Samples are signed (True) or unsigned (False)
5858//| :param int sample_rate: The sample rate to be used for all samples
6565//| import audiomixer
6666//| import digitalio
6767//|
68- //| # Required for CircuitPlayground Express
69- //| speaker_enable = digitalio.DigitalInOut(board.SPEAKER_ENABLE)
70- //| speaker_enable.switch_to_output(value=True)
71- //|
68+ //| a = audioio.AudioOut(board.A0)
7269//| music = audiocore.WaveFile(open("cplay-5.1-16bit-16khz.wav", "rb"))
7370//| drum = audiocore.WaveFile(open("drum.wav", "rb"))
7471//| mixer = audiomixer.Mixer(voice_count=2, sample_rate=16000, channel_count=1,
7572//| bits_per_sample=16, samples_signed=True)
76- //| a = audioio.AudioOut(board.A0)
7773//|
7874//| print("playing")
7975//| # Have AudioOut play our Mixer source
Original file line number Diff line number Diff line change 3737//|
3838//| .. module:: audiomixer
3939//| :synopsis: Support for audio mixer
40- //| :platform: SAMD21
4140//|
4241//| The `audiomixer` module contains core classes for mixing audio sources
4342//|
You can’t perform that action at this time.
0 commit comments