diff --git a/src/trx-core/src/audio.rs b/src/trx-core/src/audio.rs index da9bf70..c833c68 100644 --- a/src/trx-core/src/audio.rs +++ b/src/trx-core/src/audio.rs @@ -59,6 +59,9 @@ pub const AUDIO_MSG_VCHAN_REMOVE: u8 = 0x11; /// Server → client: a virtual channel was destroyed server-side (e.g. went out of bandwidth). /// Payload: 16-byte UUID of the destroyed channel. pub const AUDIO_MSG_VCHAN_DESTROYED: u8 = 0x12; +/// Client → server: update the audio filter bandwidth of an existing virtual channel. +/// Payload: JSON `{"uuid": "", "bandwidth_hz": }`. +pub const AUDIO_MSG_VCHAN_BW: u8 = 0x13; /// Maximum payload size for normal messages (1 MB). const MAX_PAYLOAD_SIZE: u32 = 1_048_576; diff --git a/src/trx-core/src/vchan.rs b/src/trx-core/src/vchan.rs index 203a810..aeab095 100644 --- a/src/trx-core/src/vchan.rs +++ b/src/trx-core/src/vchan.rs @@ -95,6 +95,9 @@ pub trait VirtualChannelManager: Send + Sync { /// Update the demodulation mode of an existing channel. fn set_channel_mode(&self, id: Uuid, mode: &RigMode) -> Result<(), VChanError>; + /// Update the audio filter bandwidth of an existing channel. + fn set_channel_bandwidth(&self, id: Uuid, bandwidth_hz: u32) -> Result<(), VChanError>; + /// Subscribe to decoded PCM audio from a channel. /// Returns `None` if the channel UUID does not exist. fn subscribe_pcm(&self, id: Uuid) -> Option>>;