const.go 1.9 KB

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