@@ -11,12 +11,12 @@ use crate::{
1111 ChannelCount , OutputStream , SampleRate ,
1212} ;
1313
14- /// Error configuring or opening speakers input
14+ /// Error configuring or opening speakers output
1515#[ allow( missing_docs) ]
1616#[ derive( Debug , thiserror:: Error , Clone ) ]
1717pub enum Error {
1818 /// No output device is available on the system.
19- #[ error( "There is no input device" ) ]
19+ #[ error( "There is no output device" ) ]
2020 NoDevice ,
2121 /// Failed to get the default output configuration for the device.
2222 #[ error( "Could not get default output configuration for output device: '{device_name}'" ) ]
@@ -54,7 +54,7 @@ pub struct ConfigNotSet;
5454/// Some methods are only available when this types counterpart: `DeviceIsSet` is present.
5555pub struct DeviceNotSet ;
5656
57- /// Builder for configuring and opening speakers input streams.
57+ /// Builder for configuring and opening speakers output streams.
5858#[ must_use]
5959pub struct SpeakersBuilder < Device , Config , E = fn ( cpal:: StreamError ) >
6060where
@@ -122,13 +122,13 @@ impl<Device, Config, E> SpeakersBuilder<Device, Config, E>
122122where
123123 E : FnMut ( cpal:: StreamError ) + Send + Clone + ' static ,
124124{
125- /// Sets the input device to use.
125+ /// Sets the output device to use.
126126 ///
127127 /// # Example
128128 /// ```no_run
129129 /// # use rodio::speakers::{SpeakersBuilder, available_outputs};
130- /// let input = available_outputs()?.remove(2);
131- /// let builder = SpeakersBuilder::new().device(input )?;
130+ /// let output = available_outputs()?.remove(2);
131+ /// let builder = SpeakersBuilder::new().device(output )?;
132132 /// # Ok::<(), Box<dyn std::error::Error>>(())
133133 /// ```
134134 pub fn device (
@@ -152,7 +152,7 @@ where
152152 } )
153153 }
154154
155- /// Uses the system's default input device.
155+ /// Uses the system's default output device.
156156 ///
157157 /// # Example
158158 /// ```no_run
@@ -187,7 +187,7 @@ impl<Config, E> SpeakersBuilder<DeviceIsSet, Config, E>
187187where
188188 E : FnMut ( cpal:: StreamError ) + Send + Clone + ' static ,
189189{
190- /// Uses the device's default input configuration.
190+ /// Uses the device's default output configuration.
191191 ///
192192 /// # Example
193193 /// ```no_run
@@ -227,7 +227,7 @@ where
227227 } )
228228 }
229229
230- /// Sets a custom input configuration.
230+ /// Sets a custom output configuration.
231231 ///
232232 /// # Example
233233 /// ```no_run
@@ -278,7 +278,7 @@ impl<E> SpeakersBuilder<DeviceIsSet, ConfigIsSet, E>
278278where
279279 E : FnMut ( cpal:: StreamError ) + Send + Clone + ' static ,
280280{
281- /// Sets the sample rate for input .
281+ /// Sets the sample rate for output .
282282 ///
283283 /// # Error
284284 /// Returns an error if the requested sample rate combined with the
@@ -361,7 +361,7 @@ where
361361 }
362362 }
363363
364- /// Sets the number of input channels.
364+ /// Sets the number of output channels.
365365 ///
366366 /// # Example
367367 /// ```no_run
@@ -417,13 +417,13 @@ where
417417 } )
418418 }
419419
420- /// Sets the buffer size for the input .
420+ /// Sets the buffer size for the output .
421421 ///
422422 /// This has no impact on latency, though a too small buffer can lead to audio
423423 /// artifacts if your program can not get samples out of the buffer before they
424424 /// get overridden again.
425425 ///
426- /// Normally the default input config will have this set up correctly.
426+ /// Normally the default output config will have this set up correctly.
427427 ///
428428 /// # Example
429429 /// ```no_run
@@ -504,7 +504,7 @@ impl<Device, E> SpeakersBuilder<Device, ConfigIsSet, E>
504504where
505505 E : FnMut ( cpal:: StreamError ) + Send + Clone + ' static ,
506506{
507- /// Returns the current input configuration.
507+ /// Returns the current output configuration.
508508 ///
509509 /// # Example
510510 /// ```no_run
@@ -526,7 +526,7 @@ impl<E> SpeakersBuilder<DeviceIsSet, ConfigIsSet, E>
526526where
527527 E : FnMut ( cpal:: StreamError ) + Send + Clone + ' static ,
528528{
529- /// Opens the speakers input stream.
529+ /// Opens the speakers output stream.
530530 ///
531531 /// # Example
532532 /// ```no_run
0 commit comments