"Fossies" - the Fresh Open Source Software Archive

Member "FreeBASIC-1.09.0-win64/inc/AL/alut.bi" (1 Jan 2022, 5236 Bytes) of package /windows/misc/FreeBASIC-1.09.0-win64.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Visual Basic source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 '' FreeBASIC binding for freealut-freealut_1_1_0
    2 ''
    3 '' based on the C header files:
    4 ''   Steve Baker <sjbaker1@airmail.net>
    5 ''     Initial version of the sources and the specification
    6 ''
    7 ''   Sven Panne <sven.panne@aedion.de>
    8 ''     Build system
    9 ''     General hacking
   10 ''     Specification maintenance
   11 ''
   12 ''   Erik Hofman <erik@ehofman.com>
   13 ''     Fixes and additions to the sound file loaders
   14 ''     playfile demo
   15 ''
   16 ''   Prakash Punnoor <prakash@punnoor.de>
   17 ''     CMake build system
   18 ''
   19 ''   This library is free software; you can redistribute it and/or
   20 ''   modify it under the terms of the GNU Library General Public
   21 ''   License as published by the Free Software Foundation; either
   22 ''   version 2 of the License, or (at your option) any later version.
   23 ''
   24 ''   This library is distributed in the hope that it will be useful,
   25 ''   but WITHOUT ANY WARRANTY; without even the implied warranty of
   26 ''   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   27 ''   Library General Public License for more details.
   28 ''
   29 ''   You should have received a copy of the GNU Lesser General Public
   30 ''   License along with this library; if not, write to the Free Software
   31 ''   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
   32 ''
   33 '' translated to FreeBASIC by:
   34 ''   Copyright © 2015 FreeBASIC development team
   35 
   36 #pragma once
   37 
   38 #inclib "alut"
   39 
   40 #include once "AL/al.bi"
   41 #include once "AL/alc.bi"
   42 
   43 extern "C"
   44 
   45 #define AL_ALUT_H
   46 const ALUT_API_MAJOR_VERSION = 1
   47 const ALUT_API_MINOR_VERSION = 1
   48 const ALUT_ERROR_NO_ERROR = 0
   49 const ALUT_ERROR_OUT_OF_MEMORY = &h200
   50 const ALUT_ERROR_INVALID_ENUM = &h201
   51 const ALUT_ERROR_INVALID_VALUE = &h202
   52 const ALUT_ERROR_INVALID_OPERATION = &h203
   53 const ALUT_ERROR_NO_CURRENT_CONTEXT = &h204
   54 const ALUT_ERROR_AL_ERROR_ON_ENTRY = &h205
   55 const ALUT_ERROR_ALC_ERROR_ON_ENTRY = &h206
   56 const ALUT_ERROR_OPEN_DEVICE = &h207
   57 const ALUT_ERROR_CLOSE_DEVICE = &h208
   58 const ALUT_ERROR_CREATE_CONTEXT = &h209
   59 const ALUT_ERROR_MAKE_CONTEXT_CURRENT = &h20A
   60 const ALUT_ERROR_DESTROY_CONTEXT = &h20B
   61 const ALUT_ERROR_GEN_BUFFERS = &h20C
   62 const ALUT_ERROR_BUFFER_DATA = &h20D
   63 const ALUT_ERROR_IO_ERROR = &h20E
   64 const ALUT_ERROR_UNSUPPORTED_FILE_TYPE = &h20F
   65 const ALUT_ERROR_UNSUPPORTED_FILE_SUBTYPE = &h210
   66 const ALUT_ERROR_CORRUPT_OR_TRUNCATED_DATA = &h211
   67 const ALUT_WAVEFORM_SINE = &h100
   68 const ALUT_WAVEFORM_SQUARE = &h101
   69 const ALUT_WAVEFORM_SAWTOOTH = &h102
   70 const ALUT_WAVEFORM_WHITENOISE = &h103
   71 const ALUT_WAVEFORM_IMPULSE = &h104
   72 const ALUT_LOADER_BUFFER = &h300
   73 const ALUT_LOADER_MEMORY = &h301
   74 
   75 declare function alutInit(byval argcp as long ptr, byval argv as zstring ptr ptr) as ALboolean
   76 declare function alutInitWithoutContext(byval argcp as long ptr, byval argv as zstring ptr ptr) as ALboolean
   77 declare function alutExit() as ALboolean
   78 declare function alutGetError() as ALenum
   79 declare function alutGetErrorString(byval error as ALenum) as const zstring ptr
   80 declare function alutCreateBufferFromFile(byval fileName as const zstring ptr) as ALuint
   81 declare function alutCreateBufferFromFileImage(byval data as const any ptr, byval length as ALsizei) as ALuint
   82 declare function alutCreateBufferHelloWorld() as ALuint
   83 declare function alutCreateBufferWaveform(byval waveshape as ALenum, byval frequency as ALfloat, byval phase as ALfloat, byval duration as ALfloat) as ALuint
   84 declare function alutLoadMemoryFromFile(byval fileName as const zstring ptr, byval format as ALenum ptr, byval size as ALsizei ptr, byval frequency as ALfloat ptr) as any ptr
   85 declare function alutLoadMemoryFromFileImage(byval data as const any ptr, byval length as ALsizei, byval format as ALenum ptr, byval size as ALsizei ptr, byval frequency as ALfloat ptr) as any ptr
   86 declare function alutLoadMemoryHelloWorld(byval format as ALenum ptr, byval size as ALsizei ptr, byval frequency as ALfloat ptr) as any ptr
   87 declare function alutLoadMemoryWaveform(byval waveshape as ALenum, byval frequency as ALfloat, byval phase as ALfloat, byval duration as ALfloat, byval format as ALenum ptr, byval size as ALsizei ptr, byval freq as ALfloat ptr) as any ptr
   88 declare function alutGetMIMETypes(byval loader as ALenum) as const zstring ptr
   89 declare function alutGetMajorVersion() as ALint
   90 declare function alutGetMinorVersion() as ALint
   91 declare function alutSleep(byval duration as ALfloat) as ALboolean
   92 
   93 #ifdef __FB_DARWIN__
   94     declare sub alutLoadWAVFile(byval fileName as ALbyte ptr, byval format as ALenum ptr, byval data as any ptr ptr, byval size as ALsizei ptr, byval frequency as ALsizei ptr)
   95     declare sub alutLoadWAVMemory(byval buffer as ALbyte ptr, byval format as ALenum ptr, byval data as any ptr ptr, byval size as ALsizei ptr, byval frequency as ALsizei ptr)
   96 #else
   97     declare sub alutLoadWAVFile(byval fileName as ALbyte ptr, byval format as ALenum ptr, byval data as any ptr ptr, byval size as ALsizei ptr, byval frequency as ALsizei ptr, byval loop as ALboolean ptr)
   98     declare sub alutLoadWAVMemory(byval buffer as ALbyte ptr, byval format as ALenum ptr, byval data as any ptr ptr, byval size as ALsizei ptr, byval frequency as ALsizei ptr, byval loop as ALboolean ptr)
   99 #endif
  100 
  101 declare sub alutUnloadWAV(byval format as ALenum, byval data as any ptr, byval size as ALsizei, byval frequency as ALsizei)
  102 
  103 end extern