Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: IrrKlang 4 delphi

  1. #1

    IrrKlang 4 delphi

    hi ppl my new wrapper

    irrKlang is a powerful high level API for playing back sound in 3D and 2D applications like games, scientific visualizations and multimedia applications.
    irrKlang is free for non commercial use.

    irrKlang's current features are:

    * Plays multiple file formats, .WAV, .MP3, .OGG, .MOD, .XM, .IT, .S3M...
    * Buffered and streamed audio playback, in 2D and 3D.
    * High level resource management and autodetection: The engine can do everything for you. Just tell it to play a sound file, and it will load, cache and/or stream sound data for you automaticly, depending on what is best for performance and memory usage. But if you want to specify how the engine should handle this, you can do this as well.
    * Sophisticated 3D sound engine designed to be used in games.
    * Extendable: Possibility to write own file format readers/decoders to extend the engine with it.
    * Sound effects such as the doppler effect for 3D sounds or 2D effects like echo, reverb, distortion, flanger and more.
    * Exact seeking and position retrieval in streams and buffered sounds.
    * Plugin System: Simply copy external created plugins to the place where irrKlang is being used and extend its functionality with it.
    * Multi/Singlethreaded modes: The engine can run both multithreaded or singlethreaded in the same thread as your application, to make it possible to debug your application easier for example.
    * Low level audio output manipulation: Possibility to alter any aspect of a playing sound like panning, volume and 3d position.
    * Sound event call backs.
    * File reading functionality can be overwritten by the user, of course, making it possible to let irrKlang read from own file archives for example.



    http://depositfiles.com/files/4257518



    [pascal]

    unit IrrKlang;

    interface
    uses windows;

    const IRRK_DLL='irrKlangFrameWork.dll';
    type

    KVEC3=record
    x,y,z:single;
    end;
    E_SOUND_OUTPUT_DRIVER=(
    ESOD_AUTO_DETECT,//'Autodetects the best sound driver for the system
    ESOD_DIRECT_SOUND,//'DirectSound sound outout driver, windows only
    ESOD_NULL,//'Null driver, creating no sound output
    ESOD_COUNT,//'Amount of built-in sound engine types
    ESOD_FORCE_32_BIT = $7fffffff);



    E_SOUND_ENGINE_OPTIONS=(
    ESEO_MULTI_THREADED = $01,
    ESEO_MUTE_IF_NOT_FOCUSED = $02,
    ESEO_LOAD_PLUGINS = $04,
    ESEO_USE_3D_BUFFERS = $08,
    ESEO_PRINT_DEBUG_INFO_TO_DEBUGGER = $10,
    ESEO_LINEAR_ROLLOFF = $20,
    ESEO_DEFAULT_OPTIONS = ESEO_MULTI_THREADED or ESEO_LOAD_PLUGINS or ESEO_USE_3D_BUFFERS or ESEO_PRINT_DEBUG_INFO_TO_DEBUGGER,
    ESEO_FORCE_32_BIT = $7fffffff);





    E_STREAM_MODE=(
    ESM_AUTO_DETECT = 0,// ' Autodetects the best stream mode for a specified audio data
    ESM_STREAMING , // ' Streams the audio data when needed
    ESM_NO_STREAMING , // ' Loads the whole audio data into the memory
    ESM_FORCE_32_BIT ); // ' compile these enumeration values to 32 bit.


    IRRKType=class
    end;

    ICHANNEL=^IRRKType;
    ISOUND=^IRRKType;
    IFXS=^IRRKType;





    procedure IRRKEngine_Start(driver:E_SOUND_OUTPUT_DRIVER;Opti on:E_SOUND_ENGINE_OPTIONS;scale:single=0.5);cdecl ;external IRRK_DLL;
    procedure IRRKEngine_End;cdecl ;external IRRK_DLL;
    procedure IRRKEngine_Update;cdecl ;external IRRK_DLL;

    function IRRKEngine_AddSoundFromFile(cptrFilechar;streamMode:E_STREAM_MODE;preload:boolean=fals e):ISOUND;cdecl ;external IRRK_DLL;
    function IRRKEngine_AddSoundFromMemory(memoryointer;sizeInBytes:integer;SoundNamechar;copyMemory:boolean=true):ISOUND;cdecl ;external IRRK_DLL;

    procedure IRRKEngine_StopAllSounds;cdecl ;external IRRK_DLL;
    procedure IRRKEngine_SetAllSoundsPaused(bPaused:boolean=true );cdecl ;external IRRK_DLL;

    function IRRKEngine_IsPlayingEx(const soundNamechar):boolean;cdecl ;external IRRK_DLL;
    function IRRKEngine_IsPlaying(source:ISOUND):boolean;cdecl ;external IRRK_DLL;

    procedure IRRKEngine_SetMaxDistance(value:single);cdecl ;external IRRK_DLL;
    procedure IRRKEngine_SetMInDistance(value:single);cdecl ;external IRRK_DLL;

    procedure IRRKEngine_RemoveSoundEx(SoundNamechar);cdecl ;external IRRK_DLL;
    procedure IRRKEngine_RemoveAllSounds;cdecl ;external IRRK_DLL;

    procedure IRRKEngine_SetVolume(volume:single);cdecl ;external IRRK_DLL;
    function IRRKEngine_GetVolume:single;cdecl ;external IRRK_DLL;

    procedure IRRKEngine_SetListenerPosition(pos,lookdir ,velPerSecond,upVector:KVEC3);cdecl ;external IRRK_DLL;

    function IRRKEngine_Play2D (source:ISOUND;playLooped:boolean=false;startPause d:boolean=false;track:boolean=true; enableSoundEffects:boolean=false):ICHANNEL;cdecl ;external IRRK_DLL;
    function IRRKEngine_Play2DEx (const SoundNamechar;playLooped:boolean=false;startPaused:boolean= false;track:boolean=true;streamMode:E_STREAM_MODE= ESM_AUTO_DETECT; enableSoundEffects:boolean=false):ICHANNEL;cdecl ;external IRRK_DLL;
    function IRRKEngine_Play3D (source:ISOUND;POS:KVEC3;playLooped:boolean=false; startPaused:boolean=false;track:boolean=true; enableSoundEffects:boolean=false):ICHANNEL;cdecl ;external IRRK_DLL;
    function IRRKEngine_Play3DEx (const SoundNamechar;POS:KVEC3;playLooped:boolean=false;startPause d:boolean=false;track:boolean=true;streamMode:E_ST REAM_MODE=ESM_AUTO_DETECT; enableSoundEffects:boolean=false):ICHANNEL;cdecl ;external IRRK_DLL;
    //************************************************** ******************************+
    //************************************************** ******************************+
    //************************************************** ******************************+
    //************************************************** ******************************+
    procedure IRRKSound_Drop (Sound:ICHANNEL);cdecl ;external IRRK_DLL;
    procedure IRRKSound_Stop (Sound:ICHANNEL);cdecl ;external IRRK_DLL;
    function IRRKSound_IsPaused (Sound:ICHANNEL):boolean;cdecl ;external IRRK_DLL;
    function IRRKSound_IsFinished (Sound:ICHANNEL):boolean;cdecl ;external IRRK_DLL;
    procedure IRRKSound_Pause (Sound:ICHANNEL;value:boolean);cdecl ;external IRRK_DLL;
    procedure IRRKSound_SetVolume (Sound:ICHANNEL;value:single);cdecl ;external IRRK_DLL;
    procedure IRRKSound_SetPan (Sound:ICHANNEL;value:single);cdecl ;external IRRK_DLL;
    procedure IRRKSound_SetMinDistance (Sound:ICHANNEL;value:single);cdecl ;external IRRK_DLL;
    procedure IRRKSound_SetMaxDistance (Sound:ICHANNEL;value:single);cdecl ;external IRRK_DLL;
    function IRRKSound_SetPlayPosition (Sound:ICHANNEL;value:integer):boolean;cdecl ;external IRRK_DLL;
    function IRRKSound_GetPlayPosition (Sound:ICHANNEL ):integer;cdecl ;external IRRK_DLL;
    procedure IRRKSound_SetPlaybackSpeed (Sound:ICHANNEL;value:single=1.0);cdecl ;external IRRK_DLL;
    function IRRKSound_GetPlayLength (Sound:ICHANNEL ):integer;cdecl ;external IRRK_DLL;
    procedure IRRKSound_Set3DPosition (Sound:ICHANNEL; Pos:KVEC3);cdecl ;external IRRK_DLL;
    procedure IRRKSound_Set3DVelocity (Sound:ICHANNEL; Vel:KVEC3);cdecl ;external IRRK_DLL;
    //************************************************** ******************************+
    //************************************************** ******************************+
    //************************************************** ******************************+
    //************************************************** ******************************+

    function IRRKFX_CreateEffect (sound:ISound):IFXS;cdecl ;external IRRK_DLL;
    procedure IRRKFX_DisableAllEffects (fx:IFXS);cdecl ;external IRRK_DLL;

    function IRRKFX_IsChorusEnabled (fx:IFXS):boolean;cdecl ;external IRRK_DLL;
    function IRRKFX_IsCompressorEnabled (fx:IFXS):boolean;cdecl ;external IRRK_DLL;
    function IRRKFX_IsEchoEnabled (fx:IFXS):boolean;cdecl ;external IRRK_DLL;
    function IRRKFX_IsFlangerEnabled (fx:IFXS):boolean;cdecl ;external IRRK_DLL;
    function IRRKFX_IsGargleEnabled (fx:IFXS):boolean;cdecl ;external IRRK_DLL;
    function IRRKFX_IsReverbEnabled (fx:IFXS):boolean;cdecl ;external IRRK_DLL;
    function IRRKFX_IsParamEqEnabled (fx:IFXS):boolean;cdecl ;external IRRK_DLL;
    function IRRKFX_IsWavesReverbEnabled (fx:IFXS):boolean;cdecl ;external IRRK_DLL;


    procedure IRRKFX_DisableChorus(fx:IFXS);cdecl ;external IRRK_DLL;
    procedure IRRKFX_DisableCompressor(fx:IFXS);cdecl ;external IRRK_DLL;
    procedure IRRKFX_DisableDistortion(fx:IFXS);cdecl ;external IRRK_DLL;
    procedure IRRKFX_DisableEcho(fx:IFXS);cdecl ;external IRRK_DLL;
    procedure IRRKFX_DisableFlanger(fx:IFXS);cdecl ;external IRRK_DLL;
    procedure IRRKFX_DisableGargle(fx:IFXS);cdecl ;external IRRK_DLL;
    procedure IRRKFX_DisableReverb(fx:IFXS);cdecl ;external IRRK_DLL;
    procedure IRRKFX_DisableParamEq(fx:IFXS);cdecl ;external IRRK_DLL;
    procedure IRRKFX_DisableWavesReverb(fx:IFXS);cdecl ;external IRRK_DLL;


    function IRRKFX_SetChorus(fx:IFXS;
    fWetDryMix:single= 50;
    fDepth :single = 10;
    fFeedback :single = 25;
    fFrequency:single = 1.1;
    sinusWaveForm:boolean = true;
    fDelay:single = 16;
    lPhase:integer = 90):boolean;cdecl ;external IRRK_DLL;


    function IRRKFX_SetCompressor(fx:IFXS;
    fGain :single= 0;
    fAttack:single = 10;
    fRelease:single = 200;
    fThreshold:single = -20;
    fRatio:single = 3;
    fPredelay:single = 4):boolean;cdecl ;external IRRK_DLL;


    function IRRKFX_SetDistortion(fx:IFXS;
    fGain:single= -18;
    fEdge:single = 15;
    fPostEQCenterFrequency :single= 2400;
    fPostEQBandwidth:single = 2400;
    fPreLowpassCutoff :single= 8000):boolean;cdecl ;external IRRK_DLL;



    function IRRKFX_SetEcho(fx:IFXS;
    fWetDryMix:single = 50;
    fFeedback:single = 50;
    fLeftDelay:single = 500;
    fRightDelay:single = 500;
    lPanDelay:integer = 0):boolean;cdecl ;external IRRK_DLL;



    function IRRKFX_SetFlanger(fx:IFXS;
    fWetDryMix:single = 50;
    fDepth:single = 100;
    fFeedback:single = -50;
    fFrequency :single= 0.25;
    triangleWaveForm:boolean = true;
    fDelay:single = 2;
    lPhase:integer = 0):boolean;cdecl ;external IRRK_DLL;

    function IRRKFX_SetGargle(fx:IFXS;
    rateHz:integer = 20;
    sinusWaveForm:boolean = true):boolean;cdecl ;external IRRK_DLL;

    function IRRKFX_SetReverb(fx:IFXS;
    lRoom:integer = -1000;
    lRoomHF:integer = -100;
    flRoomRolloffFactor:single = 0;
    flDecayTime:single = 1.49;
    flDecayHFRatio :single= 0.83;
    lReflections:integer = -2602;
    flReflectionsDelay:single = 0.007;
    lReverb:integer = 200;
    flReverbDelay :single= 0.011;
    flDiffusion:single = 100.0;
    flDensity :single= 100.0;
    flHFReference :single= 5000.0):boolean;cdecl ;external IRRK_DLL;

    function IRRKFX_SetParamEq(fx:IFXS;
    fCenter :single= 8000;
    fBandwidth :single= 12;
    fGain :single= 0):boolean;cdecl ;external IRRK_DLL;

    function IRRKFX_SetWavesReverb(fx:IFXS;
    fInGain :single= 0;
    fReverbMix :single= 0;
    fReverbTime :single= 1000;
    fHighFreqRTRatio :single= 0.001):boolean;cdecl ;external IRRK_DLL;



    function kvec(x,y,z:single):KVEC3;

    implementation
    function kvec(x,y,z:single):KVEC3;
    begin
    result.x:=x;
    result.y:=y;
    result.z:=z;

    end;

    end.
    [/pascal]
    Never underestimate the power of Delphi.
    <br />There's those who play games,...and then there's who make games...

  2. #2

    IrrKlang 4 delphi

    great
    From brazil (:

    Pascal pownz!

  3. #3

    IrrKlang 4 delphi

    great stuff, bumped to news item.
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  4. #4

    IrrKlang 4 delphi

    Looks great, have to try it out.
    Edit: Too bad irrklang is not free..
    Marmin^.Style

  5. #5

    IrrKlang 4 delphi

    do u dont join with frequency on MSN? i never see you online

    great work!

    thanks man...
    Knowledge is power.

  6. #6

    IrrKlang 4 delphi

    Quote Originally Posted by marmin
    Looks great, have to try it out.
    Edit: Too bad irrklang is not free..

    why not free?
    Knowledge is power.

  7. #7

    IrrKlang 4 delphi

    Quote Originally Posted by djoker
    irrKlang is free for non commercial use.
    I don't see the trouble. If you're going to make money using someone else's component then there's nothing wrong with him getting a slice. The obsession with "ONLY FREE!" is silly, as I'd like to see you work a 40 hour job for free every week without having millions in the bank.

    Either give him a slice, if you want to sell, or do it yourself.

  8. #8

    IrrKlang 4 delphi

    It just feels wrong to me, To me, it's commercial or not-commercial, not both... But it's very off-topic, so i'll stop it right here.
    Marmin^.Style

  9. #9

    IrrKlang 4 delphi

    Quote Originally Posted by lordzero
    do u dont join with frequency on MSN? i never see you online

    great work!

    thanks man...
    sim desculpa eu na ligo muito o msn ...
    tenho poco temp no pc
    Never underestimate the power of Delphi.
    <br />There's those who play games,...and then there's who make games...

  10. #10

    IrrKlang 4 delphi

    Quote Originally Posted by savage
    great stuff, bumped to news item.
    AND ir4 delphi
    Never underestimate the power of Delphi.
    <br />There's those who play games,...and then there's who make games...

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •