@@ -347,7 +347,7 @@ stream_file() instead.
347347
348348* class* `` CaptureDevice ``
349349
350- `` CaptureDevice (self, input_format: miniaudio.SampleFormat = <SampleFormat.SIGNED16: 2>, nchannels: int = 2, sample_rate: int = 44100, buffersize_msec: int = 200, device_id: Union[_cffi_backend._CDataBase , NoneType] = None, callback_periods: int = 0, backends: Union[List[miniaudio.Backend], NoneType] = None, thread_prio: miniaudio.ThreadPriority = <ThreadPriority.HIGHEST: 0>, app_name: str = '') ``
350+ `` CaptureDevice (self, input_format: miniaudio.SampleFormat = <SampleFormat.SIGNED16: 2>, nchannels: int = 2, sample_rate: int = 44100, buffersize_msec: int = 200, device_id: Union[_cffi_backend.CData , NoneType] = None, callback_periods: int = 0, backends: Union[List[miniaudio.Backend], NoneType] = None, thread_prio: miniaudio.ThreadPriority = <ThreadPriority.HIGHEST: 0>, app_name: str = '') ``
351351> An audio device provided by miniaudio, for audio capture (recording).
352352
353353> * method* `` close (self) ``
@@ -388,7 +388,7 @@ callback generator as raw bytes. (it should already be started before)
388388
389389* class* `` DuplexStream ``
390390
391- `` DuplexStream (self, playback_format: miniaudio.SampleFormat = <SampleFormat.SIGNED16: 2>, playback_channels: int = 2, capture_format: miniaudio.SampleFormat = <SampleFormat.SIGNED16: 2>, capture_channels: int = 2, sample_rate: int = 44100, buffersize_msec: int = 200, playback_device_id: Union[_cffi_backend._CDataBase , NoneType] = None, capture_device_id: Union[_cffi_backend._CDataBase , NoneType] = None, callback_periods: int = 0, backends: Union[List[miniaudio.Backend], NoneType] = None, thread_prio: miniaudio.ThreadPriority = <ThreadPriority.HIGHEST: 0>, app_name: str = '') ``
391+ `` DuplexStream (self, playback_format: miniaudio.SampleFormat = <SampleFormat.SIGNED16: 2>, playback_channels: int = 2, capture_format: miniaudio.SampleFormat = <SampleFormat.SIGNED16: 2>, capture_channels: int = 2, sample_rate: int = 44100, buffersize_msec: int = 200, playback_device_id: Union[_cffi_backend.CData , NoneType] = None, capture_device_id: Union[_cffi_backend.CData , NoneType] = None, callback_periods: int = 0, backends: Union[List[miniaudio.Backend], NoneType] = None, thread_prio: miniaudio.ThreadPriority = <ThreadPriority.HIGHEST: 0>, app_name: str = '') ``
392392> Joins a capture device and a playback device.
393393
394394> * method* `` close (self) ``
@@ -409,7 +409,19 @@ already be started before passing it in)
409409`` IceCastClient (self, url: str, update_stream_title: Callable[[ForwardRef('IceCastClient'), str], NoneType] = None) ``
410410> A simple client for IceCast audio streams as miniaudio streamable source. If the stream has Icy
411411 Meta Data, the stream_title attribute will be updated with the actual title taken from the meta
412- data. You can also provide a callback to be called when a new stream title is available.
412+ data. You can also provide a callback to be called when a new stream title is available. The
413+ downloading of the data from the internet is done in a background thread and it tries to keep a
414+ (small) buffer filled with available data to read.
415+
416+ > * method* `` close (self) ``
417+ > > Stop the stream, aborting the background downloading.
418+
419+ > * method* `` read (self, num_bytes: int) -> bytes ``
420+ > > Read a chunk of data from the stream.
421+
422+ > * method* `` seek (self, offset: int, origin: miniaudio.SeekOrigin) -> bool ``
423+ > > Override this if the stream supports seeking. Note: seek support is sometimes not needed if you
424+ give the file type to a decoder upfront. You can ignore this method then.
413425
414426
415427* class* `` MiniaudioError ``
@@ -420,7 +432,7 @@ data. You can also provide a callback to be called when a new stream title is av
420432
421433* class* `` PlaybackDevice ``
422434
423- `` PlaybackDevice (self, output_format: miniaudio.SampleFormat = <SampleFormat.SIGNED16: 2>, nchannels: int = 2, sample_rate: int = 44100, buffersize_msec: int = 200, device_id: Union[_cffi_backend._CDataBase , NoneType] = None, callback_periods: int = 0, backends: Union[List[miniaudio.Backend], NoneType] = None, thread_prio: miniaudio.ThreadPriority = <ThreadPriority.HIGHEST: 0>, app_name: str = '') ``
435+ `` PlaybackDevice (self, output_format: miniaudio.SampleFormat = <SampleFormat.SIGNED16: 2>, nchannels: int = 2, sample_rate: int = 44100, buffersize_msec: int = 200, device_id: Union[_cffi_backend.CData , NoneType] = None, callback_periods: int = 0, backends: Union[List[miniaudio.Backend], NoneType] = None, thread_prio: miniaudio.ThreadPriority = <ThreadPriority.HIGHEST: 0>, app_name: str = '') ``
424436> An audio device provided by miniaudio, for audio playback.
425437
426438> * method* `` close (self) ``
@@ -449,6 +461,16 @@ The generator should already be started before passing it in.
449461> Base class for streams of audio data bytes. Can be used as a contextmanager, to properly call
450462 close().
451463
464+ > * method* `` close (self) ``
465+ > > Override this to properly close the stream and free resources.
466+
467+ > * method* `` read (self, num_bytes: int) -> Union[bytes, memoryview] ``
468+ > > override this to provide data bytes to the consumer of the stream
469+
470+ > * method* `` seek (self, offset: int, origin: miniaudio.SeekOrigin) -> bool ``
471+ > > Override this if the stream supports seeking. Note: seek support is sometimes not needed if you
472+ give the file type to a decoder upfront. You can ignore this method then.
473+
452474
453475* class* `` WavFileReadStream ``
454476
0 commit comments