src/slappy

Search:
Group by:
Source   Edit  

Listener functionsSource functionsSlappy functionsSound functions

Types

Listener = object
Source   Edit  
SlappyError = object of IOError
Source   Edit  
Sound = ref object
  
Source   Edit  
Source = ref object
  
Source   Edit  

Procs

proc bits(sound: Sound): int {.inline, ...raises: [], tags: [], forbids: [].}
Gets the bit rate or bits per sample, only 8bits and 16bits per sample supported. Source   Edit  
proc channels(sound: Sound): int {.inline, ...raises: [], tags: [], forbids: [].}
Gets number of channels, only 1 or 2 are supported. WARNING: 2 channel sounds can't be positioned in 3d. Source   Edit  
proc coneInnerAngle(source: Source): float32 {....raises: [], tags: [], forbids: [].}
Source   Edit  
proc coneInnerAngle=(source: Source; v: float32) {....raises: [], tags: [],
    forbids: [].}
Inner angle of the sound cone, in degrees. Default is 360. Source   Edit  
proc coneOuterAngle(source: Source): float32 {....raises: [], tags: [], forbids: [].}
Source   Edit  
proc coneOuterAngle=(source: Source; v: float32) {....raises: [], tags: [],
    forbids: [].}
Outer angle of the sound cone, in degrees. Default is 360. Source   Edit  
proc coneOuterGain(source: Source): float32 {....raises: [], tags: [], forbids: [].}
Source   Edit  
proc coneOuterGain=(source: Source; v: float32) {....raises: [], tags: [],
    forbids: [].}
The gain when outside the oriented cone. Source   Edit  
proc duration(sound: Sound): float32 {.inline, ...raises: [], tags: [], forbids: [].}
Gets duration of the sound in seconds. Source   Edit  
proc forward(a: Mat4): Vec3 {.inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc freq(sound: Sound): int {.inline, ...raises: [], tags: [], forbids: [].}
Gets the frequency or the samples per second rate. Source   Edit  
proc gain(listener: Listener): float32 {....raises: [], tags: [], forbids: [].}
Get master gain. Source   Edit  
proc gain(source: Source): float32 {....raises: [], tags: [], forbids: [].}
Source   Edit  
proc gain=(listener: Listener; v: float32) {....raises: [], tags: [], forbids: [].}
Set Master gain. Value should be positive. Source   Edit  
proc gain=(source: Source; v: float32) {....raises: [], tags: [], forbids: [].}
Source   Edit  
proc halfDistance(source: Source): float32 {....raises: [], tags: [], forbids: [].}
Source   Edit  
proc halfDistance=(source: Source; v: float32) {....raises: [], tags: [],
    forbids: [].}
The distance under which the volume for the source would normally drop by half (before being influenced by rolloff factor or maxDistance). Source   Edit  
proc looping(source: Source): bool {....raises: [], tags: [], forbids: [].}
Source   Edit  
proc looping=(source: Source; v: bool) {....raises: [], tags: [], forbids: [].}
Source   Edit  
proc mat(listener: Listener): Mat4 {....raises: [], tags: [], forbids: [].}
Get orientation of the main listener. Source   Edit  
proc mat(source: Source): Mat4 {....raises: [], tags: [], forbids: [].}
Source   Edit  
proc mat=(listener: Listener; mat: Mat4) {....raises: [], tags: [], forbids: [].}
Set orientation of the main listener. Source   Edit  
proc mat=(source: Source; mat: Mat4) {....raises: [], tags: [], forbids: [].}
Source   Edit  
proc maxDistance(source: Source): float32 {....raises: [], tags: [], forbids: [].}
Source   Edit  
proc maxDistance=(source: Source; v: float32) {....raises: [], tags: [],
    forbids: [].}
Set the Inverse Clamped Distance Model to set the distance where there will no longer be any attenuation of the source. Source   Edit  
proc maxGain(source: Source): float32 {....raises: [], tags: [], forbids: [].}
Source   Edit  
proc maxGain=(source: Source; v: float32) {....raises: [], tags: [], forbids: [].}
The minimum gain for this source. Source   Edit  
proc minGain(source: Source): float32 {....raises: [], tags: [], forbids: [].}
Source   Edit  
proc minGain=(source: Source; v: float32) {....raises: [], tags: [], forbids: [].}
The minimum gain for this source. Source   Edit  
proc newSound(): Sound {....raises: [], tags: [], forbids: [].}
Source   Edit  
proc newSound(filePath: string): Sound {.
    ...raises: [IOError, OSError, ValueError, SnappyError],
    tags: [ReadIOEffect, WriteIOEffect], forbids: [].}
Source   Edit  
proc pitch(source: Source): float32 {....raises: [], tags: [], forbids: [].}
Source   Edit  
proc pitch=(source: Source; v: float32) {....raises: [], tags: [], forbids: [].}
Source   Edit  
proc play(sound: Sound): Source {....raises: [], tags: [], forbids: [].}
Plays the sound. Source   Edit  
proc play(source: Source) {....raises: [], tags: [], forbids: [].}
Source   Edit  
proc playback(source: Source): float32 {....raises: [], tags: [], forbids: [].}
Get the playback position in seconds (offset). Source   Edit  
proc playback=(source: Source; v: float32) {....raises: [], tags: [], forbids: [].}
Set playback position in seconds (offset). Source   Edit  
proc playing(source: Source): bool {.inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc pos(a: Mat4): Vec3 {.inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc pos(listener: Listener): Vec3 {....raises: [], tags: [], forbids: [].}
Get position of the main listener. Source   Edit  
proc pos(source: Source): Vec3 {....raises: [], tags: [], forbids: [].}
Source   Edit  
proc pos=(listener: Listener; pos: Vec3) {....raises: [], tags: [], forbids: [].}
Set position of the main listener. Source   Edit  
proc pos=(source: Source; pos: Vec3) {....raises: [], tags: [], forbids: [].}
Set source position. Source   Edit  
proc rolloffFactor(source: Source): float32 {....raises: [], tags: [], forbids: [].}
Source   Edit  
proc rolloffFactor=(source: Source; v: float32) {....raises: [], tags: [],
    forbids: [].}
Set rolloff rate for the source. Default is 1.0. Source   Edit  
proc samples(sound: Sound): int {.inline, ...raises: [], tags: [], forbids: [].}
Gets number of samples. Source   Edit  
proc size(sound: Sound): int {.inline, ...raises: [], tags: [], forbids: [].}
Gets the size of the sound buffer in bytes. Source   Edit  
proc slappyClose() {....raises: [SlappyError], tags: [], forbids: [].}
Call this on exit. Source   Edit  
proc slappyInit() {....raises: [SlappyError], tags: [], forbids: [].}
Call this on start of your program. Source   Edit  
proc slappyTick() {....raises: [], tags: [], forbids: [].}
Updates all sources and sounds. Source   Edit  
proc source(sound: Sound): Source {....raises: [], tags: [], forbids: [].}
Gets the source for the sound. Source   Edit  
proc stop(source: Source) {....raises: [], tags: [], forbids: [].}
Source   Edit  
proc up(a: Mat4): Vec3 {.inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc vel(listener: Listener): Vec3 {....raises: [], tags: [], forbids: [].}
Get velocity of the main listener. Source   Edit  
proc vel(source: Source): Vec3 {....raises: [], tags: [], forbids: [].}
Source   Edit  
proc vel=(listener: Listener; vel: Vec3) {....raises: [], tags: [], forbids: [].}
Set velocity of the main listener. Source   Edit  
proc vel=(source: Source; vel: Vec3) {....raises: [], tags: [], forbids: [].}
Source   Edit