Skip to content

Commit c99ada4

Browse files
authored
Merge pull request #45 from HEnquist/release0.18
Release0.18
2 parents 33709b2 + 0c0689b commit c99ada4

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "wasapi"
3-
version = "0.17.0"
3+
version = "0.18.0"
44
edition = "2021"
55
rust-version = "1.74"
66
authors = ["HEnquist <henrik.enquist@gmail.com>"]
@@ -13,7 +13,7 @@ readme = "README.md"
1313
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1414

1515
[dependencies.windows]
16-
version = "0.59"
16+
version = "0.61"
1717
features = ["Foundation",
1818
"Win32_Media_Audio",
1919
"Win32_Foundation",
@@ -32,7 +32,7 @@ features = ["Foundation",
3232
widestring = "1.1.0"
3333
log = "0.4.22"
3434
num-integer = "0.1"
35-
windows-core = "0.59"
35+
windows-core = "0.61"
3636
thiserror = "2.0.9"
3737

3838
[dev-dependencies]

src/api.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1159,6 +1159,7 @@ impl AudioClient {
11591159
}
11601160
}
11611161

1162+
/// Check if the Acoustic Echo Cancellation (AEC) effect is currently present.
11621163
fn is_aec_effect_present(&self) -> WasapiRes<bool> {
11631164
// IAudioEffectsManager requires Windows 11 (build 22000 or higher).
11641165
let audio_effects_manager = match self.get_audio_effects_manager() {
@@ -1188,7 +1189,7 @@ pub struct AudioSessionControl {
11881189
}
11891190

11901191
impl AudioSessionControl {
1191-
/// Get the current state
1192+
/// Get the current session state
11921193
pub fn get_state(&self) -> WasapiRes<SessionState> {
11931194
let state = unsafe { self.control.GetState()? };
11941195
#[allow(non_upper_case_globals)]
@@ -1273,7 +1274,7 @@ pub struct AudioRenderClient {
12731274
impl AudioRenderClient {
12741275
/// Write raw bytes data to a device from a slice.
12751276
/// The number of frames to write should first be checked with the
1276-
/// `get_available_space_in_frames()` method on the [AudioClient].
1277+
/// [AudioClient::get_available_space_in_frames()] method.
12771278
/// The buffer_flags argument can be used to mark a buffer as silent.
12781279
pub fn write_to_device(
12791280
&self,
@@ -1305,7 +1306,7 @@ impl AudioRenderClient {
13051306

13061307
/// Write raw bytes data to a device from a deque.
13071308
/// The number of frames to write should first be checked with the
1308-
/// `get_available_space_in_frames()` method on the [AudioClient].
1309+
/// [AudioClient::get_available_space_in_frames()] method.
13091310
/// The buffer_flags argument can be used to mark a buffer as silent.
13101311
pub fn write_to_device_from_deque(
13111312
&self,
@@ -1392,7 +1393,7 @@ pub struct AudioCaptureClient {
13921393

13931394
impl AudioCaptureClient {
13941395
/// Get number of frames in next packet when in shared mode.
1395-
/// In exclusive mode it returns None, instead use [AudioClient::get_buffer_size()] or [AudioClient::get_current_padding()].
1396+
/// In exclusive mode it returns `None`, instead use [AudioClient::get_buffer_size()] or [AudioClient::get_current_padding()].
13961397
/// See [IAudioCaptureClient::GetNextPacketSize](https://learn.microsoft.com/en-us/windows/win32/api/audioclient/nf-audioclient-iaudiocaptureclient-getnextpacketsize).
13971398
pub fn get_next_packet_size(&self) -> WasapiRes<Option<u32>> {
13981399
if let Some(ShareMode::Exclusive) = self.sharemode {
@@ -1411,7 +1412,7 @@ impl AudioCaptureClient {
14111412
}
14121413

14131414
/// Read raw bytes from a device into a slice. Returns the number of frames
1414-
/// that was read, and the BufferFlags describing the buffer that the data was read from.
1415+
/// that was read, and the `BufferFlags` describing the buffer that the data was read from.
14151416
/// The slice must be large enough to hold all data.
14161417
/// If it is longer that needed, the unused elements will not be modified.
14171418
pub fn read_from_device(&self, data: &mut [u8]) -> WasapiRes<(u32, BufferFlags)> {
@@ -1548,7 +1549,7 @@ impl AcousticEchoCancellationControl {
15481549
/// # Parameters
15491550
/// - `endpoint_id`: An optional string containing the device ID of the audio render endpoint to use as the loopback reference.
15501551
/// If set to `None`, Windows will automatically select the reference device.
1551-
/// You can obtain the device ID by calling [`Device::get_id`].
1552+
/// You can obtain the device ID by calling [Device::get_id()].
15521553
///
15531554
/// # Errors
15541555
/// Returns an error if setting the echo cancellation render endpoint fails.

src/events.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ use std::slice;
22
use widestring::U16CString;
33
use windows::{
44
core::{implement, Result, GUID, PCWSTR},
5-
Win32::Foundation::BOOL,
65
Win32::Media::Audio::{
76
AudioSessionDisconnectReason, AudioSessionState, AudioSessionStateActive,
87
AudioSessionStateExpired, AudioSessionStateInactive, DisconnectReasonDeviceRemoval,
@@ -224,7 +223,7 @@ impl IAudioSessionEvents_Impl for AudioSessionEvents_Impl {
224223
fn OnSimpleVolumeChanged(
225224
&self,
226225
newvolume: f32,
227-
newmute: BOOL,
226+
newmute: windows_core::BOOL,
228227
eventcontext: *const GUID,
229228
) -> Result<()> {
230229
trace!("New volume: {}, mute: {:?}", newvolume, newmute);

0 commit comments

Comments
 (0)