Best audio library for sims sounds and music files in Visual Studio net?

Discussion in 'Programming' started by francot514, Apr 5, 2014.

  1. francot514

    francot514 Well-Known Member

    I need some help, im trying to understand what is the best audio library for playing sims sound files like mp3 musics and audio xa files, i know project dollhouse uses naudio.dll and bass.dll, but i want to know which is better for implementing audios and also what methods to use for playing it...
  2. xezno

    xezno Member

    WMPLib.
  3. francot514

    francot514 Well-Known Member

    That is a bad idea, you cannot use multiple channels in windows media player, also you need to create more than one virtual players to have music and sound working at time, you should considerer change it, if youre using on xexno tso. (open tso)
  4. xezno

    xezno Member

    i like complicated
  5. francot514

    francot514 Well-Known Member

    I solved it using bass.dll audio library i can now load sounds and music. You should declare some functions in application, instead of using it as reference. Also i was able to convert sims xa file to wav sound.


    Code:
      Private Declare Function BASS_Init Lib "bass.dll" (ByVal device As Integer, ByVal freq As UInteger, ByVal flags As UInteger, ByVal win As IntPtr, ByVal clsid As UInteger) As Boolean
      Private Declare Function BASS_Free Lib "bass.dll" () As Boolean
      Private Declare Function BASS_ChannelStop Lib "bass.dll" (ByVal handle As IntPtr) As Boolean
      Private Declare Function BASS_ChannelGetLength Lib "bass.dll" (ByVal handle As IntPtr, ByVal mode As Integer) As Integer
      Private Declare Function BASS_StreamFree Lib "bass.dll" (ByVal handle As IntPtr) As Boolean
      Private Declare Function BASS_ChannelGetPosition Lib "bass.dll" (ByVal handle As IntPtr, ByVal mode As Integer) As Integer
      Private Declare Function BASS_ChannelPlay Lib "bass.dll" (ByVal handle As IntPtr, ByVal restart As Boolean) As Boolean
      Private Declare Function BASS_SetVolume Lib "bass.dll" (ByVal volume As Single) As Boolean
      Private Declare Function BASS_StreamCreateFile Lib "bass.dll" Alias "BASS_StreamCreateFile" (ByVal mem As Boolean, ByVal file As String, ByVal offset As UInteger, ByVal offsethigh As UInteger, ByVal length As UInteger, ByVal lengthhigh As UInteger, ByVal flags As UInteger) As IntPtr
      Private Declare Function BASS_SampleLoad Lib "bass.dll" Alias "BASS_SampleLoad" (ByVal mem As Boolean, ByVal file As String, ByVal offset As UInteger, ByVal offsethigh As UInteger, ByVal length As UInteger, ByVal max As UInteger, ByVal flags As UInteger) As IntPtr
      Private Declare Function BASS_SampleFree Lib "bass.dll" (ByVal handle As IntPtr) As Boolean
      Private Declare Function BASS_SampleGetChannel Lib "bass.dll" (ByVal handle As IntPtr, ByVal onlynew As Boolean) As IntPtr
      Private Declare Function BASS_SampleStop Lib "bass.dll" (ByVal handle As IntPtr) As Boolean
    xezno and RHY3756547 like this.
  6. Fatbag

    Fatbag Member

    aidancheddar likes this.
  7. francot514

    francot514 Well-Known Member

    Thanks for your help, youre always very helpfull about sims stufff....
  8. francot514

    francot514 Well-Known Member

    What methods to use to perform a play sounds inside the iff files, i mean those fwav chunk references...
  9. Fatbag

    Fatbag Member

    There are no sound files in any IFF files. fwav is a plain-text format specifying the name of a sound.

Share This Page