waveout

package
v0.0.0-...-03f6f9a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WAVE_FORMAT_PCM  = 1
	WAVE_MAPPER      = -1
	WHDR_DONE        = 1
	CALLBACK_EVENT   = 0x50000
	MAXPNAMELEN      = 32
	MMSYSERR_NOERROR = 0
)

Variables

This section is empty.

Functions

func OutputDeviceNameToID

func OutputDeviceNameToID(devName string) (int, error)

func OutputDeviceNames

func OutputDeviceNames() []string

func OutputDevices

func OutputDevices() func() (int, string, error)

Types

type DWORD

type DWORD uint32

type WAVEFORMATEX

type WAVEFORMATEX struct {
	// contains filtered or unexported fields
}

The WAVEFORMATEX structure defines the format of waveform-audio data

type WAVEHDR

type WAVEHDR struct {
	// contains filtered or unexported fields
}

The WAVEHDR structure defines the header used to identify a waveform-audio buffer

type WAVEOUTCAPS

type WAVEOUTCAPS struct {
	// contains filtered or unexported fields
}

The WAVEOUTCAPS structure describes the capabilities of a waveform-audio output device

type WORD

type WORD uint16

Some win types

type WavePlayer

type WavePlayer struct {
	// contains filtered or unexported fields
}

func NewWavePlayer

func NewWavePlayer(channels, samplesPerSec, bitsPerSample, bufSize int, preferredDeviceName string) (*WavePlayer, error)

func (*WavePlayer) Close

func (wp *WavePlayer) Close() error

func (*WavePlayer) GetVolume

func (wp *WavePlayer) GetVolume() (uint16, uint16)

func (*WavePlayer) Pause

func (wp *WavePlayer) Pause(pauseState bool)

func (*WavePlayer) SetOutputDevice

func (wp *WavePlayer) SetOutputDevice(devName string) error

func (*WavePlayer) SetVolume

func (wp *WavePlayer) SetVolume(l, r uint16)

func (*WavePlayer) Stop

func (wp *WavePlayer) Stop()

func (*WavePlayer) Sync

func (wp *WavePlayer) Sync()

func (*WavePlayer) Write

func (wp *WavePlayer) Write(data []byte) (int, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL