Skip to content

get_Data

James Brundage edited this page Oct 23, 2026 · 1 revision

get_Data

Gets Wave Data

Gets the byte[] describing a wave.

View Source
<#
.SYNOPSIS
    Gets Wave Data
.DESCRIPTION
    Gets the byte[] describing a wave.
#>
[CmdletBinding()]
param()

# If we have not cached our data chunk
if (-not $this.'#data') {
    # read chunks
    $null = $this.Chunk
    # If there is still nothing
    if (-not $this.'#data') {        
        return # return nothing.
    }
}
# Use the comma operator to return a list containin the data, 
# so that it unrolls to the data itself (rather than tries to stream the bytes)
return ,$this.'#data'

Clone this wiki locally