Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / C++ gurus PLEASE HELP! How to load .ogg files to load sound

Author
Message
Alex_Peres
AGK Master
15
Years of Service
User Offline
Joined: 13th May 2009
Location: The Milky Way Galaxy
Posted: 10th Jul 2009 19:49
Please help!

How to load .ogg file to play it?
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 11th Jul 2009 05:50
I dont think DarkGDK supports the OGG format by default, looking at the docs, I see .WAV support(in dbLoadSound) and MIDI and .MP3 support(in dbLoadMusic).

So if GDK doesnt support it officially, you are left with a couple of options.

First is to research the format, and write your own loader to get the sound data and give it to your program in a way it can understand, either by reformatting it to a WAV and using GDK or pulling the data into a 3rd party audio library or using DirectSound itself.

Second is to have a look around the web(I would start by thoroughly searching these forums though, chances are someone has thought of/asked about/done something similar if not the same as what you want) and locate everything you can about the OGG format and how to load and play it, and then find an open source/free function library to load the file for you and send it straight to directsound.

The last option is probably the one I would take myself, at least initially in a development cycle. That is to convert the OGG format file(or whichever format really) to a .WAV or .MP3 format file so that GDK can play it without me having to spend too much time mucking around with it. You can find a heap of audio file format converters online, both free and paid, by doing a google search for topics like "free OGG to WAV converter" or "free Audio file format converter" etc.

If it ain't broke.... DONT FIX IT !!!
Alex_Peres
AGK Master
15
Years of Service
User Offline
Joined: 13th May 2009
Location: The Milky Way Galaxy
Posted: 11th Jul 2009 15:09
I meant how to load and use bass.dll to load music?

Using mp3 files in your project cost 2500$!
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 11th Jul 2009 17:42
Then why not use .WAV?

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 11th Jul 2009 18:36
Quote: "Using mp3 files in your project cost 2500$! "


The way I understand it from a little research around the web, is that for one, it depends entirely on what country you are in as to whether you need to have a license, as the original format was released publicly(for free) the legal issue is that further people have applied for a patent on the same thing after a year has passed from it's original public release, known as patent extending(can only be done on patents before 1995...im a little fuzzy about it, but it looks like a legal technicality for some corporations or other to suck some more money from us lol) :

"The initial near-complete MPEG-1 standard (parts 1,2,3) was publicly available in December 6, 1991 as ISO CD 11172." - from MP3 Wikipedia.

(please note that MPEG-1 Layer 3 is what is referred to as MP3, NOT MPEG-3, thats a different format again)

Secondly, I think, from the wording of the sites I looked at, that licensing is only needed if you are producing encoder/decoder software. I think that to record, and use either freely availalbe/licensed coverter software to convert your music into the MP3 format(or record straight to that format) simply to play in your application, you wouldnt need a license to do that(for free apps, commercial apps may different), as the encoding/decoding would, I assume, be done by GDK. As long as its your own music of course, copyright would still apply to commercial music.

Here is a little trivia about the MP3 format for you :

*MP3 license revenues generated about €100 million for the Fraunhofer Society in 2005

*Current patent holders declined to enforce license fees on free and open source decoders, which allows many free MP3 decoders to develop.[36] Thus, while patent fees have been an issue for companies that attempt to use MP3, they have not meaningfully impacted users, which allows the format to grow in popularity.


If I am wrong about the above, someone please correct me, as I use MP3 format music in some of my apps, and would rather not have to worry about some possible future law suite if I am incorrect.

As a last note, if its a commercial project you are working on, given the legal ambiguities above, I would probably steer clear of the format or make sure I have licensing for the countries the project is being released in.

If it ain't broke.... DONT FIX IT !!!
Alex_Peres
AGK Master
15
Years of Service
User Offline
Joined: 13th May 2009
Location: The Milky Way Galaxy
Posted: 12th Jul 2009 18:25
I can't use wav because it is too big size, and I can't use mp3 because it use ffshow component (and 2500$ because my game will be selling in almost whole world)!!!
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 12th Jul 2009 20:17 Edited at: 12th Jul 2009 20:20
Quote: "(and 2500$ because my game will be selling in almost whole world)!!!"


Right...


Just use this:
http://www.ambiera.com/irrklang/

You do have to buy a license to use it commercially, but it's only 65€, which is nothing really!

Login to post a reply

Server time is: 2024-11-25 06:44:27
Your offset time is: 2024-11-25 06:44:27