Sprite3DReal und Fmodex Test

Spiele, Demos, Grafikzeug und anderes unterhaltendes.
Benutzeravatar
SoS
Beiträge: 340
Registriert: 29.08.2004 09:31
Kontaktdaten:

Sprite3DReal und Fmodex Test

Beitrag von SoS »

Da ich mich seit längerem mit der Fmodex.dll beschäftige und am Wochenende eine neue Version herauskam,habe ich mal ein kleines
Testprogramm geschrieben um einige Effekte zu testen.
Damit es nicht so langweilig aussieht habe ich dazu die Sprite3DReal benutzt. ;)

Abgespielt werden können (hoffendlich) MP3,MP2,MPEG,S3M,XM,IT,MID,OGG,WMA,ASF,WMV,AIFF,FLAC,WAV-Dateien.
Ich habe nicht alle Formate getestet und eingebunden.
Abgespielt wird,um eine FFT-Anzeige zu gewährleisten,im Softwaremodus.
Mit den Tasten 1-6 kann man verschiedene effekte testen.
Wer dann noch nicht genug hat kann auf "K" drücken und sich danach an den cursortasten vergreifen. :mrgreen:

Viel Spass damit.

http://people.freenet.de/n83u13/s3dr-fmodex-test.zip
Benutzeravatar
Green Snake
Beiträge: 1394
Registriert: 22.02.2005 19:08

Beitrag von Green Snake »

:o

Cool :D
-.-"
Benutzeravatar
STARGÅTE
Kommando SG1
Beiträge: 7031
Registriert: 01.11.2005 13:34
Wohnort: Glienicke
Kontaktdaten:

Beitrag von STARGÅTE »

mmm sieht irgendwie seltsam aus aber lustig
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Aktuelles Projekt: Lizard - Skriptsprache für symbolische Berechnungen und mehr
Kekskiller
Beiträge: 752
Registriert: 14.09.2004 21:39
Kontaktdaten:

Beitrag von Kekskiller »

Cool! So kann ich vielleicht endlich mein Problem für MainThemes in Spielen lösen, die in bestimmten Bereichen wie in Höhlen oder so ein Echo haben sollen. Cooles Teil, die Lib muss ich mir auch mal holen :allright:
Benutzeravatar
SoS
Beiträge: 340
Registriert: 29.08.2004 09:31
Kontaktdaten:

Beitrag von SoS »

Kekskiller hat geschrieben:Cool! So kann ich vielleicht endlich mein Problem für MainThemes in Spielen lösen, die in bestimmten Bereichen wie in Höhlen oder so ein Echo haben sollen. Cooles Teil, die Lib muss ich mir auch mal holen :allright:
Bis es mal eine offizielle Lib geben wird kann sich warscheinlich noch etwas hinziehen. :roll:
Du kannst ja solange meine "selbstgestrickte" zum testen nehmen,die
habe ich für dieses Progamm benutzt.
http://people.freenet.de/n83u13/FmodExlib.zip

Alle Fmodbefehle am Ende mit "_",wie winapi halt.
Zuletzt geändert von SoS am 08.11.2005 00:00, insgesamt 1-mal geändert.
xperience2003
Beiträge: 972
Registriert: 04.10.2004 18:42
Computerausstattung: Amiga, LinuxMint, Windows7
Wohnort: gotha
Kontaktdaten:

Beitrag von xperience2003 »

sehr geil

das mit den effekten such ich schon ewig
Benutzeravatar
SoS
Beiträge: 340
Registriert: 29.08.2004 09:31
Kontaktdaten:

Beitrag von SoS »

Ich werde morgen mal den Code vom Fmodpart mit den Effekten posten,ist eigendlich simpel ;)

/edit

Code: Alles auswählen

Procedure ERRCHECK(errcode )
  Protected FMOD_ErrorString.s
  If errcode= #True
    Select errcode
      ;Case #FMOD_OK:                         FMOD_ErrorString = "No errors."
      Case #FMOD_ERR_ALREADYLOCKED:          FMOD_ErrorString = "Tried to call lock a second time before unlock was called."
      Case #FMOD_ERR_BADCOMMAND:             FMOD_ErrorString = "Tried to call a function on a data type that does not allow this type of functionality (ie calling Sound::lock on a streaming sound)."
      Case #FMOD_ERR_CDDA_DRIVERS:           FMOD_ErrorString = "Neither NTSCSI nor ASPI could be initialised."
      Case #FMOD_ERR_CDDA_INIT:              FMOD_ErrorString = "An error occurred while initialising the CDDA subsystem."
      Case #FMOD_ERR_CDDA_INVALID_DEVICE:    FMOD_ErrorString = "Couldn't find the specified device."
      Case #FMOD_ERR_CDDA_NOAUDIO:           FMOD_ErrorString = "No audio tracks on the specified disc."
      Case #FMOD_ERR_CDDA_NODEVICES:         FMOD_ErrorString = "No CD/DVD devices were found."
      Case #FMOD_ERR_CDDA_NODISC:            FMOD_ErrorString = "No disc present in the specified drive."
      Case #FMOD_ERR_CDDA_READ:              FMOD_ErrorString = "A CDDA read error occurred."
      Case #FMOD_ERR_CHANNEL_ALLOC:          FMOD_ErrorString = "Error trying to allocate a channel."
      Case #FMOD_ERR_CHANNEL_STOLEN:         FMOD_ErrorString = "The specified channel has been reused to play another sound."
      Case #FMOD_ERR_COM:                    FMOD_ErrorString = "A Win32 COM related error occured. COM failed to initialize or a QueryInterface failed meaning a Windows codec or driver was not installed properly."
      Case #FMOD_ERR_DMA:                    FMOD_ErrorString = "DMA Failure.  See debug output for more information."
      Case #FMOD_ERR_DSP_CONNECTION:         FMOD_ErrorString = "DSP connection error.  Either the connection caused a cyclic dependancy or a generator unit attempted to have a unit attached to it."
      Case #FMOD_ERR_DSP_FORMAT:             FMOD_ErrorString = "DSP Format error.  A DSP unit may have attempted to connect to this network with the wrong format.  IE a floating point unit on a PocketPC system."
      Case #FMOD_ERR_DSP_NOTFOUND:           FMOD_ErrorString = "DSP connection error.  Couldn't find the DSP unit specified."
      Case #FMOD_ERR_DSP_RUNNING:            FMOD_ErrorString = "DSP error.  Cannot perform this operation while the network is in the middle of running.  This will most likely happen if a connection or disconnection is attempted in a DSP callback."
      Case #FMOD_ERR_DSP_TOOMANYCONNECTIONS: FMOD_ErrorString = "DSP connection error.  The unit being connected to or disconnected should only have 1 input or output."
      Case #FMOD_ERR_FILE_BAD:               FMOD_ErrorString = "Error loading file."
      Case #FMOD_ERR_FILE_COULDNOTSEEK:      FMOD_ErrorString = "Couldn't perform seek operation."
      Case #FMOD_ERR_FILE_EOF:               FMOD_ErrorString = "End of file unexpectedly reached while trying to read essential data (truncated data?)."
      Case #FMOD_ERR_FILE_NOTFOUND:          FMOD_ErrorString = "File not found."
      Case #FMOD_ERR_FORMAT:                 FMOD_ErrorString = "Unsupported file or audio format."
      Case #FMOD_ERR_HTTP:                   FMOD_ErrorString = "A HTTP error occurred. This is a catch-all for HTTP errors not listed elsewhere."
      Case #FMOD_ERR_HTTP_ACCESS:            FMOD_ErrorString = "The specified resource requires authentication or is forbidden."
      Case #FMOD_ERR_HTTP_PROXY_AUTH:        FMOD_ErrorString = "Proxy authentication is required to access the specified resource."
      Case #FMOD_ERR_HTTP_SERVER_ERROR:      FMOD_ErrorString = "A HTTP server error occurred."
      Case #FMOD_ERR_HTTP_TIMEOUT:           FMOD_ErrorString = "The HTTP request timed out."
      Case #FMOD_ERR_INITIALIZATION:         FMOD_ErrorString = "FMOD was not initialized correctly to support this function."
      Case #FMOD_ERR_INITIALIZED:            FMOD_ErrorString = "Cannot call this command after Systeminit."
      Case #FMOD_ERR_INTERNAL:               FMOD_ErrorString = "An error occured that wasnt supposed to.  Contact support."
      Case #FMOD_ERR_INVALID_HANDLE:         FMOD_ErrorString = "An invalid object handle was used."
      Case #FMOD_ERR_INVALID_PARAM:          FMOD_ErrorString = "An invalid parameter was passed to this function."
      Case #FMOD_ERR_IRX:                    FMOD_ErrorString = "PS2 only.  fmodex.irx failed to initialize.  This is most likely because you forgot to load it."
      Case #FMOD_ERR_MEMORY:                 FMOD_ErrorString = "Not enough memory or resources."
      Case #FMOD_ERR_MEMORY_IOP:             FMOD_ErrorString = "PS2 only.  Not enough memory or resources on PlayStation 2 IOP ram."
      Case #FMOD_ERR_MEMORY_SRAM:            FMOD_ErrorString = "Not enough memory or resources on console sound ram."
      Case #FMOD_ERR_NEEDSOFTWARE:           FMOD_ErrorString = "Tried to use a feature that requires the software engine but the software engine has been turned off."
      Case #FMOD_ERR_NET_CONNECT:            FMOD_ErrorString = "Couldn't connect to the specified host."
      Case #FMOD_ERR_NET_SOCKET_ERROR:       FMOD_ErrorString = "A socket error occurred.  This is a catch-all for socket-related errors not listed elsewhere."
      Case #FMOD_ERR_NET_URL:                FMOD_ErrorString = "The specified URL couldn't be resolved."
      Case #FMOD_ERR_NOTREADY:               FMOD_ErrorString = "Operation could not be performed because specified sound is not ready."
      Case #FMOD_ERR_OUTPUT_ALLOCATED:       FMOD_ErrorString = "Error initializing output device, but more specifically, the output device is already in use and cannot be reused."
      Case #FMOD_ERR_OUTPUT_CREATEBUFFER:    FMOD_ErrorString = "Error creating hardware sound buffer."
      Case #FMOD_ERR_OUTPUT_DRIVERCALL:      FMOD_ErrorString = "A call to a standard soundcard driver failed, which could possibly mean a bug in the driver or resources were missing or exhausted."
      Case #FMOD_ERR_OUTPUT_FORMAT:          FMOD_ErrorString = "Soundcard does not support the minimum features needed for this soundsystem (16bit stereo output)."
      Case #FMOD_ERR_OUTPUT_INIT:            FMOD_ErrorString = "Error initializing output device."
      Case #FMOD_ERR_OUTPUT_NOHARDWARE:      FMOD_ErrorString = "FMOD_HARDWARE was specified but the sound card does not have the resources nescessary to play it."
      Case #FMOD_ERR_OUTPUT_NOSOFTWARE:      FMOD_ErrorString = "Attempted to create a software sound but no software channels were specified in System::init."
      Case #FMOD_ERR_PAN:                    FMOD_ErrorString = "Panning only works with mono or stereo sound sources."
      Case #FMOD_ERR_PLUGIN:                 FMOD_ErrorString = "An unspecified error has been FMOD_ErrorString =ed from a 3rd party plugin."
      Case #FMOD_ERR_PLUGIN_MISSING:         FMOD_ErrorString = "A requested output, dsp unit type or codec was not available."
      Case #FMOD_ERR_PLUGIN_RESOURCE:        FMOD_ErrorString = "A resource that the plugin requires cannot be found."
      Case #FMOD_ERR_RECORD:                 FMOD_ErrorString = "An error occured trying to initialize the recording device. "
      Case #FMOD_ERR_REVERB_INSTANCE:        FMOD_ErrorString = "Specified Instance in FMOD_REVERB_PROPERTIES couldn't be set. Most likely because another application has locked the EAX4 FX slot."
      Case #FMOD_ERR_SUBSOUND_ALLOCATED:     FMOD_ErrorString = "This subsound is already being used by another sound, you cannot have more than one parent to a sound.  Null out the other parent's entry first."
      Case #FMOD_ERR_TAGNOTFOUND:            FMOD_ErrorString = "The specified tag could not be found or there are no tags."
      Case #FMOD_ERR_TOOMANYCHANNELS:        FMOD_ErrorString = "The sound created exceeds the allowable input channel count.  This can be increased with System::setMaxInputChannels"
      Case #FMOD_ERR_UNIMPLEMENTED:          FMOD_ErrorString = "Something in FMOD hasn't been implemented when it should be! contact support!"
      Case #FMOD_ERR_UNINITIALIZED:          FMOD_ErrorString = "This command failed because System::init or System::setDriver was not called."
      Case #FMOD_ERR_UNSUPPORTED:            FMOD_ErrorString = "A commmand issued was not supported by this object.  Possibly a plugin without certain callbacks specified."
      Case #FMOD_ERR_VERSION:                FMOD_ErrorString = "The version number of this file format is not supported."
      Default :                              FMOD_ErrorString = "Unknown error."
        MessageRequester("Error", FMOD_ErrorString,#MB_ICONERROR)
    EndSelect
  EndIf
EndProcedure

;- variablenzuweisung

flange=-1
echo=-1
Reverb=-1
pitchshift=-1
distortion=-1
reverbType=-1
chorus=-1

;- Console öffnen

OpenConsole()

;- Fmodinit

result = FMOD_System_Create_(@system)
ERRCHECK(result)
If FMOD_System_Init_(system, 32, #FMOD_INIT_NORMAL , #Null)=#True : MessageRequester("Error", "Probleme mit Fmod",0):End:EndIf
song.s=OpenFileRequester("Choose music","","FMOD - MP3,MP2,MPEG,MOD,S3M,XM,IT,MID,OGG,WMA,ASF,WMV,AIFF,FLAC,WAV  | *.mp3;*.mp2;*.mpeg;*.mod;*.s3m;*.xm;*.it;*.mid;*.ogg;*.wma;*.asf;*.wmv;*.aiff;*.flac;*.wav",0)
If song=""
MessageRequester("Error", "Dann eben nicht :p",0):End:EndIf

result = FMOD_System_CreateStream_ (system, song, #FMOD_SOFTWARE | #FMOD_ACCURATETIME | #FMOD_CREATESTREAM | #FMOD_LOOP_NORMAL|#FMOD_2D ,0, @sound)
ERRCHECK(result)


FMOD_Channel_IsPlaying_(channel, @isplaying)
If isplaying
  If sound
    FMOD_Sound_Release_(sound)
    sound=#Null
  EndIf
EndIf


result = FMOD_System_PlaySound_(system, #FMOD_CHANNEL_FREE, sound, 0, @channel)
ERRCHECK(result)

;- dsp-effekte

result=FMOD_System_CreateDSPByType_(system, #FMOD_DSP_TYPE_ECHO, @dspecho)
ERRCHECK(result)

result=FMOD_System_CreateDSPByType_(system, #FMOD_DSP_TYPE_FLANGE, @dspflange)
ERRCHECK(result)

result=FMOD_System_CreateDSPByType_(system, #FMOD_DSP_TYPE_REVERB, @dspreverb)
ERRCHECK(result)

result=FMOD_System_CreateDSPByType_(system, #FMOD_DSP_TYPE_PITCHSHIFT, @dsppitchshift)
ERRCHECK(result)

result=FMOD_System_CreateDSPByType_(system, #FMOD_DSP_TYPE_DISTORTION, @dspdistortion)
ERRCHECK(result)

result=FMOD_System_CreateDSPByType_(system, #FMOD_DSP_TYPE_CHORUS, @dspchorus)
ERRCHECK(result)

Repeat
  ClearConsole()
  ConsoleLocate(1,1):Print("1 echo        : "+Str(echo))
  ConsoleLocate(1,3):Print("2 flanger     : "+Str(flange))
  ConsoleLocate(1,5):Print("3 reverb      : "+Str(Reverb))
  ConsoleLocate(1,7):Print("4 pitchshift  : "+Str(pitchshift))
  ConsoleLocate(1,9):Print("5 distortion  : "+Str(distortion));
  ConsoleLocate(1,11):Print("6 chorus      : "+Str(chorus))
  PrintN(""):PrintN(""):PrintN(""):PrintN(""):Print("Effektnr. + Enter  x=Ende : ")
  inputkey.s = Input()
  If inputkey="1"
    If echo<0 
      FMOD_System_AddDSP_(system, dspecho)
      echo=-echo
    Else
      FMOD_DSP_Remove_(dspecho)
      echo=-echo
    EndIf
  EndIf
  If inputkey="2"
    If flange<0 
      FMOD_System_AddDSP_(system, dspflange)
      flange=-flange
    Else
      FMOD_DSP_Remove_(dspflange)
      flange=-flange
    EndIf
  EndIf 
  If inputkey="3"
    If Reverb<0 
      FMOD_System_AddDSP_(system, dspreverb)
      Reverb=-Reverb
    Else
      FMOD_DSP_Remove_(dspreverb)
      Reverb=-Reverb
    EndIf
  EndIf 
  If inputkey="4"
    If pitchshift<0 
      FMOD_System_AddDSP_(system, dsppitchshift)
      pitchshift=-pitchshift
    Else
      FMOD_DSP_Remove_(dsppitchshift)
      pitchshift=-pitchshift
    EndIf
  EndIf
  If inputkey="5"
    If distortion<0 
      FMOD_System_AddDSP_(system, dspdistortion)
      distortion=-distortion
    Else
      FMOD_DSP_Remove_(dspdistortion)
      distortion=-distortion
    EndIf
  EndIf;
  If inputkey="6"
    If chorus<0 
      FMOD_System_AddDSP_(system, dspchorus)
      chorus=-chorus
    Else
      FMOD_DSP_Remove_(dspchorus)
      chorus=-chorus
    EndIf
  EndIf
  
Until inputkey="x" 

result = FMOD_Sound_Release_(sound) 
result = FMOD_System_Close_(system) 
result = FMOD_System_Release_(system) 
Benutzeravatar
SoS
Beiträge: 340
Registriert: 29.08.2004 09:31
Kontaktdaten:

Beitrag von SoS »

Ich habe mal das Testprogramm in eine Gui gequetscht.
Die Tastenbelegung hat sich nicht grossartig geändert.
Die einzellnen Effekte sind mit der Maus zuschaltbar.
Neu hinzugekommen ist das man nun belibig die Texturen austauschen kann. ;)

Bild

http://people.freenet.de/n83u13/s3dr-fm ... -test2.zip

Viel Spass damit.
Benutzeravatar
edel
Beiträge: 3667
Registriert: 28.07.2005 12:39
Computerausstattung: GameBoy
Kontaktdaten:

Beitrag von edel »

Ne Gui seh ich zwar nicht aber es kommt auch ohne genial rueber :-)
Benutzeravatar
SoS
Beiträge: 340
Registriert: 29.08.2004 09:31
Kontaktdaten:

Beitrag von SoS »

Mit einer "Gui" meine ich nur die grafische oberfläche von Windows und meine sieht im moment zienlich bunt aus. :mrgreen:
Antworten