const.go 2.0 KB

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