Jump to content

martyj

Members
  • Posts

    544
  • Joined

  • Last visited

Posts posted by martyj

  1. From this you understand that LE has a limitation because it's fixed sound bitrate property, that doesn't allow a range.. for that audacity exported files, that has a fixed bitrate, are loaded without any problem, which does not happen for file with variable bitrates( most common files for what i have seen around ).

     

    The problem with variable bitrate in leadwerks is it adds a lot of extra complexity. Since leadwerks uses WAV files it doesn't support a changing bitrate through the stream. When you play audio with OpenAL you specifiy the bitrate + size of your data.

     

    To variable bitrate you'd have to change this with OpenAL at random spots in the song.

     

    Either that or we'd have to resample the audio data which adds another step of complexity.

     

    I use GoldWave or Sox to convert all my files and it appears to work just fine for me. I'd assume audacity would work perfect as well, just as long as you disable variable bitrate.

  2. It would be a lot easier if I could set set iterator=0 when it is initialized or removed from a list.

     

    Are you referring to setting the iterators value = NULL?

     

    Maybe something like this?

    std::vector<Entity*> entities;
    for(auto it = entities.begin(); it != entities.end(); it++)
    {
    if(condition)
    {
     *it = NULL;
    }
    }
    

     

    Idk if that would work, iterators are just pointers to each element. I'm not too proficient at my C++, more of a C, just a guess.

  3. You should add your shirt size and shipping info by editing your profile.

     

    I've updated my info in my profile, although you really don't have to send me anything. It was no trouble at all :P. Just happy to have this support.

  4. Why use an external library when it can be added to the engine itself?

     

    That way nobody else has to add their own support for the audio. Also it could work in 3D whereas that library is 2d only.

  5. So here is what I have at the moment.

     

    http://martyj.net/OggSound.zip

     

    The sample program is in the OggSound folder.

     

    The ogg decoding code basically comes from this link https://svn.xiph.org/trunk/vorbis/examples/decoder_example.c

     

    With some slight modification to improve readability a tiny bit and to integrate it with Leadwerks Streams.

     

    The sample program requires two static libs. libogg_static.lib and libvorbis_static.lib

     

    The way it works is that ogg is the container format and vorbis is the actual compressed audio data format.

     

    They can be found at this path relative to that folder. libvorbis-1.3.5\libvorbis-1.3.5\win32\VS2010 and libogg-1.3.2\libogg-1.3.2\win32\VS2010

     

    Just open the project in VS2015, fix the include and linking paths. Build and Profit!

     

    When I run my demo app for some reason OpenALSound isn't initialized with my example Sound class using ogg file, but it works great for wave.

     

    I've compared the output in Sound->data, and it matches an expected decompressed audio file using 16 bit little endian PCM @ 44100hz.

     

    So hopefully Josh can figure that out to get it to actually play.

     

    If there's anything else I can do to help implement this, let me know.

    • Upvote 7
  6. I found it really hard to make your own zip. In fact I was unable to make my own.

     

    If someone has a tutorial of how to do this, it would be great!

     

    -------------

     

    In other news, am working on implementing Ogg audio files. I've separated the Sound::Reload function that Josh sent into two different code paths for audio importing.

     

    I wrote a test script to import two audio files and compare their data to make sure the decompression is working.

     

    I've also just compiled libogg and libvorbis to be used into my program.

     

    I should have a working version some time tomorrow hopefully.

  7. World Factions only has 250 MB of Audio as wave data.

     

    The conversations in WF for 3 quests amounts to 19 MB in files. In fact music is the biggest usage of space. 10 songs @ 200 MB.

     

    Also 1 GB for a game is fairly small. Isn't ESO like 60 GB? I think the thing that would be better than having compressed audio, is the ability to "update" the game without needing to download all the assets again.

     

    Considering ADG is on Steam now, users will have to start updating any time there's a patch.

     

    @Josh, does Leadwerks use Streams to play Audio with the Sound class? Or is all the wave data loaded into memory when the sound is loaded?

  8. So there's been some instance of my code which would be extremely beneficial to have unit testing for. Especially in the networking aspects of my game. Along with some Generic libraries.

     

    I was wondering if anyone has used unit testing in C/C++.

     

     

    Google Test looks nice, except for it doesn't work with VS 2015 installed with NuGet.

     

    I've used CUnit before.

     

    Has anyone else used something else? I'd like something with very minimalist setup. Preferably not having to list all of my tests. Just write code, then run it.

  9. You have to add the following to your C++ Include Path.

     

    $(LeadwerksHeaderPath)\Libraries\openssl\include

     

    You also have to add the following libraries in your Linker Input dependencies.

     

    msimg32.lib

    libcryptoMT.lib

    libsslMT.lib

    Rpcrt4.lib

    crypt32.lib

    libcurl.lib

    ws2_32.lib

×
×
  • Create New...