github.com/SahandAslani/gomobile@v0.0.0-20210909130135-2cb2d44c09b2/exp/audio/al/const.go (about)

     1  // Copyright 2015 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  //go:build darwin || linux || windows
     6  // +build darwin linux windows
     7  
     8  package al
     9  
    10  // Error returns one of these error codes.
    11  const (
    12  	InvalidName      = 0xA001
    13  	InvalidEnum      = 0xA002
    14  	InvalidValue     = 0xA003
    15  	InvalidOperation = 0xA004
    16  	OutOfMemory      = 0xA005
    17  )
    18  
    19  // Distance models.
    20  const (
    21  	InverseDistance         = 0xD001
    22  	InverseDistanceClamped  = 0xD002
    23  	LinearDistance          = 0xD003
    24  	LinearDistanceClamped   = 0xD004
    25  	ExponentDistance        = 0xD005
    26  	ExponentDistanceClamped = 0xD006
    27  )
    28  
    29  // Global parameters.
    30  const (
    31  	paramDistanceModel   = 0xD000
    32  	paramDopplerFactor   = 0xC000
    33  	paramDopplerVelocity = 0xC001
    34  	paramSpeedOfSound    = 0xC003
    35  	paramVendor          = 0xB001
    36  	paramVersion         = 0xB002
    37  	paramRenderer        = 0xB003
    38  	paramExtensions      = 0xB004
    39  )
    40  
    41  // Source and listener parameters.
    42  const (
    43  	paramGain             = 0x100A
    44  	paramPosition         = 0x1004
    45  	paramVelocity         = 0x1006
    46  	paramOrientation      = 0x100F
    47  	paramMinGain          = 0x100D
    48  	paramMaxGain          = 0x100E
    49  	paramSourceState      = 0x1010
    50  	paramBuffersQueued    = 0x1015
    51  	paramBuffersProcessed = 0x1016
    52  	paramSecOffset        = 0x1024
    53  	paramSampleOffset     = 0x1025
    54  	paramByteOffset       = 0x1026
    55  )
    56  
    57  // A source could be in the state of initial, playing, paused or stopped.
    58  const (
    59  	Initial = 0x1011
    60  	Playing = 0x1012
    61  	Paused  = 0x1013
    62  	Stopped = 0x1014
    63  )
    64  
    65  // Buffer parameters.
    66  const (
    67  	paramFreq     = 0x2001
    68  	paramBits     = 0x2002
    69  	paramChannels = 0x2003
    70  	paramSize     = 0x2004
    71  )
    72  
    73  // Audio formats. Buffer.BufferData accepts one of these formats as the data format.
    74  const (
    75  	FormatMono8    = 0x1100
    76  	FormatMono16   = 0x1101
    77  	FormatStereo8  = 0x1102
    78  	FormatStereo16 = 0x1103
    79  )
    80  
    81  // CapabilityDistanceModel represents the capability of specifying a different distance
    82  // model for each source.
    83  const CapabilityDistanceModel = Capability(0x200)