Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Maxamor

Pages: [1]
1
Audio / Failed to open the audio device
« on: January 11, 2011, 04:00:43 am »
Is your working directory correct?

If you're using Visual Studio, for example, unless you have specified the working directory when you run your program by pressing the "debug" button it does not actually execute the program from your "Debug" folder. This could be a problem if you are referencing files in the same directory or using a relative path since they won't be found in the working directory.

In Visual Studio you can change your working directory for each configuration by going to Project > [project name] Properties... > Configuration Properties > Debugging > Working Directory.

2
Audio / SFML and 8/16-Bit Music?
« on: January 10, 2011, 05:54:24 pm »
When using my NSFSoundStream I use a buffer size of 4096. This is the only time I've ever dealt with SFML audio/SoundStream so I couldn't tell you much more than that. :(

3
Graphics / sf::String and int
« on: January 10, 2011, 05:01:53 am »
You can also convert primitives to std::string easily using boost::lexical_cast.

Example:

Code: [Select]
int a;
sf::String InputStr;

a = 42;

InputStr.SetText(boost::lexical_cast<int>(a));


Originally I had written my own code to perform such conversions but realized that I was reinventing a wheel that has been invented many times before :)

4
Audio / SFML and 8/16-Bit Music?
« on: January 07, 2011, 08:31:58 am »
Here are the source and header:

NSFSoundStream.hpp
NSFSoundStream.cpp

It uses some header-only things from boost, namely scoped_array and scoped_ptr. You'll need them to compile it without modification.

It also relies on the source files from blargg's Game_Music_Emu.

There really isn't a lot to it -- you use the emulator to fill the audio buffer in OnGetData, and then point to the chunk to the freshly-filled buffer. This class is essentially an adaptation of the "cpp_basics.cpp" file that comes with Game_Music_Emu into an sf::SoundStream. I never finished implementing everything, but there are enough things implemented to play the music tracks and get the voice names from an NSF file.

5
Audio / SFML and 8/16-Bit Music?
« on: January 04, 2011, 04:16:47 am »
I wanted to follow up about emulating NSF files. I was able to implement my own sf::SoundStream which plays NSF files by emulating the NES APU using blargg's audio library. I didn't implement all of the methods found in SoundStream, but my implementation is complete enough to load files and play the audio tracks.

If you're interested maybe this is something I could post in the wiki?

6
Audio / SFML and 8/16-Bit Music?
« on: November 21, 2010, 02:23:27 am »
I'm looking to do the same thing myself. I'm drawn to the idea of making some glue between blargg's NES audio library and SFML. I haven't worked on it yet, but if I figure it out I'll post it :).

Edit: My thoughts are that it may be possible using sf::SoundStream.

Pages: [1]
anything