PDA

View Full Version : Programming a simple language course


delpino
06-28-2005, 02:24 AM
Hello,

I would like to program a simple language course. Not sure which language / IDE to use. The application I would like to program should be able to play mp3's or wav's and have access to a simple database. The IDE should be free if possible. Any ideas? (I can program php, and any language related to that would help)

delpino

deadimp
06-28-2005, 04:53 AM
Not sure what exactly you're asking for, but I personally prefer using Dev-C++ (http://www.bloodshed.org/), since PHP's syntax is based off of C++'s. Try finding a sound library, such as FMOD, or make your own, if you have the time.
As for the databases, are they going to be online? If so, find a MySQL library. If not, look up file I/O in C++. It's actually pretty simple.

delpino
07-05-2005, 12:39 AM
Thanks for your reply. Is Dev-C++ working with FMOD? I didn't succeed and in another forum someone said it isn't supported. In the Readme File it states:

Remember to use the correct import library!

MSVC Users - use FMODVC.LIB
METROWERKS/CODEWARRIOR Users - use FMODVC.LIB
WATCOM Users - use FMODWC.LIB
BORLAND Users - use FMODBC.LIB
LCC-WIN32 Users - use FMODLCC.LIB
MINGW AND CYGWIN Users - use LIBFMOD.A

Linux users - link with libfmod-3.74.so (i.e. gcc file.c -lfmod-3.74)
Delphi Users - use FMOD.PAS
Visual Basic Users - use FMOD.BAS

aman
07-05-2005, 03:01 AM
Dev-C++ uses the mingw compiler by default (unless you change it) so try it with LIBFMOD.A

Mhtml
07-05-2005, 11:58 AM
MingW (DevCpp is the IDE as pointed out) works perfectly with FMOD. I added support for it in my game engine without a problem. You can also look into OpenAL.

Now I think what you [delpino] is after is probably unlikely to exist. Tutorials to create a specific application aren't as common as those to achieve the many different tasks that come together to make such an application. However, it isn't really all that difficult a task [the application] to undertake even as a beginner (which I assume you are).

You need to play audio.

void PlayStream( FSOUND_STREAM stream ){
FSOUND_Stream_Play( 0, stream );
}


You need to retrieve info from a database.

DATA* RetrieveData( int index ){
return &db[index];
}


You need to add info to a database.

int AddData( DATA *data ){
DATA *tmp;
tmp = (DATA*)realloc( db, sizeof( DATA )*dbSize++ );
db = tmp;
db[dbSize-1] = data;
return dbSize;
}


Simple enough, all you have to do is elaborate on that code. You'll probably want to save data and load it again and lots more but really it's not that hard. Just read any tutorial for beginning C++ and then string it all together, it's just lots of tiny things that accumulate into something bigger there is no need for a specific tutorial.

PS-If it wasn't obvious: Don't seriously use that code, although it'd probably work I meant it only as an example of how only a few lines form the basis of a much larger project thus illustrating how learning those basics used to write those lines provide that foundation. Your tutorial is out there, comprised of many different smaller tutorials.

delpino
07-05-2005, 08:16 PM
Thanks for you help, I managed to make FMOD work with Dev-C++. I've added LIBFMOD.A, this needed to be done through "Project Options > Parameter > Linker", a bit difficult to find if nobody tells you. At the beginning I tried to directly add to the project, I bit tricky for a C++ / FMOD newbie. Anyway its working now.

The other thing is the database. Mhtml, which database do these code example use? Is there a more detailed tutorial on this? I would like to have a database which is quite simple and free / open source. Later I want it to include in the application which other user can install on their computer. So it shouldn't be too difficult to install for other computer. Ideally it should be included in the exe file, and nothing external. With FMOD I already need a dll file, which means I've already got two files.

Mhtml
07-05-2005, 11:03 PM
Well that example was actually just how you could make a simple database yourself.

denbar
07-18-2005, 09:11 PM
I followed this discussion, as I am trying to get the same thing to work. The current FMOD documentation says to add LIBFMODEX.A (rather than LIBFMOD.A) to the Dev-C++ project, so I did that and tried to compile the example "playsound" in Dev-C++. I get many linker errors, all of which begin with 'undefined reference to _ZN4FMOD....
The Makefile shows that LIBFMODEX.A is one of the libraries linked.

Thanks for your help!

delpino
12-31-2009, 03:09 AM
Wow.. its almost 5 years now since I asked this question. My language site is now online at http://www.chinese-course.com/