File tree Expand file tree Collapse file tree 3 files changed +19
-2
lines changed
Expand file tree Collapse file tree 3 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 1+ //! Configuration file API
2+ //!
3+ //! For now, just contains two functions regarding the global configuration
4+ //! stored as a cache inside alsa-lib. Calling `update_free_global` might help
5+ //! against valgrind reporting memory leaks.
6+ use crate :: { alsa} ;
7+ use super :: error:: * ;
8+
9+ pub fn update ( ) -> Result < ( ) > {
10+ acheck ! ( snd_config_update( ) ) . map ( |_| ( ) )
11+ }
12+
13+ pub fn update_free_global ( ) -> Result < ( ) > {
14+ acheck ! ( snd_config_update_free_global( ) ) . map ( |_| ( ) )
15+ }
Original file line number Diff line number Diff line change @@ -110,6 +110,8 @@ pub use crate::hctl::HCtl as HCtl;
110110pub mod pcm;
111111pub use crate :: pcm:: PCM as PCM ;
112112
113+ pub mod config;
114+
113115pub mod rawmidi;
114116pub use crate :: rawmidi:: Rawmidi as Rawmidi ;
115117
Original file line number Diff line number Diff line change @@ -239,9 +239,9 @@ impl PCM {
239239 self . verify_format ( S :: FORMAT ) . map ( |_| IO :: new ( self ) )
240240 }
241241
242- /// Creates IO without checking [ `S`] is valid type.
242+ /// Creates IO without checking `S` is valid type.
243243 ///
244- /// SAFETY: Caller must guarantee [ `S`] is valid type for this PCM stream
244+ /// SAFETY: Caller must guarantee `S` is valid type for this PCM stream
245245 /// and that no other IO objects exist at the same time for the same stream
246246 /// (or in some other way guarantee mmap safety)
247247 pub unsafe fn io_unchecked < S : IoFormat > ( & self ) -> IO < S > {
You can’t perform that action at this time.
0 commit comments