You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
James Brundage edited this page Oct 23, 2026
·
1 revision
get_ChannelCount
Gets Wave Channel Count
Gets the number of audio channels in a wave.
1 indicates mono audio
2 indicates stereo audio
Notes
This is bytes 2 to 3 in the fmt chunk.
View Source
<#.SYNOPSIS Gets Wave Channel Count.DESCRIPTION Gets the number of audio channels in a wave. * `1` indicates mono audio * `2` indicates stereo audio.NOTES This is bytes 2 to 3 in the `fmt ` chunk.#># The expected range$range=2..3# If we have no cached formatif (-not$this.'#fmt') {
# read chunks.$null=$this.Chunk# Return if we still have no cached formatif (-not$this.'#fmt') { return }
}
# Otherwise, convert the range into a [uint16]
[bitConverter]::ToUint16([byte[]]$this.'#fmt'[$range],0)