Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Advice needed (Read 4160 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Advice needed

Hi to all,

I am very new to this wonderful forum so that's why I won't be shy and for someone i might sound stupid, but i am just a student who learns and want to learn.

So I would like to ask to all wise and experienced people here for some serious advice. I have a big big request for you all. The problem that i have is that I am trying to make on my own for study purposes a media player. Something between iTunes and Winamp. I have chose to do that in Microsoft Visual C++ as I have some background to that. I am very new to data structures. So I would like to ask anyone who had a dealing with making/programming something with or around audio players to help me sort out how that thing is doable. From where i would need to start and where could i get some "begginers type" information. I have made my GUI and i know my player will include these features:
•   Ability to play multiple audio formats, such as MP3, AAC, and WMA.
•   A configurable and collapsible graphical user interface similar to iTunes, and    miniplayer mode
•   Keyboard shortcuts
•   Volume control, mute function.
•   Shuffle and repeat options.
•   The ability to edit metadata tags (information such as the title, artist, album,    track number, or other information about the) and save back to file.
•   Availability to make own playlists
•   Users are able to quickly search the media library using tag and database    information. Library information can be conglomerated with the statistics    feature allowing users to see how they listen to music and use the software.
•   Organizes, browses, or searches music by Genre, Artist, Year, Rating, etc., which helps to save users time trying to find mp3s they know they have.
•   Manages 10,000+ files in users music collection
•   Burns MP3 (Data) CD/DVDs using the integrated burner to backup your entire music collection or for playback on any MP3-capable CD or DVD players.
•   Creates Statistics and other Reports of users music collection
•   Creates advanced SmartPlaylists which automatically generate a music mix to suit users mood. Users will need to define practically any set of criteria and the mix will be created automatically.
•   User will be available to use a Sleep Timer to play music, gradually fade it over a set period of time. It allows listening to tunes before going to sleep.


I have made some research on similar applications like iTunes, MediaMonkey and Songbird. But for now what i am stressing out is HOW actually to do it. What data structures to use and from where to take some information which will give me an ideas to start making algorithms and later on start coding.

I will appreciate your help a lot. Thank you very, very, very much

Just student.

Advice needed

Reply #1
Why not look at what others have done?

Look to the open source community.  Songbird for example, is an open source music player.  Have a peek at their code.  If they don't have a feature you're looking for, look at other projects that might. 

You may even find that you'd like to contribute to the existing projects after you've gotten your feet wet coding your own.

Advice needed

Reply #2
The foobar2000 SDK has a wonderful set of libraries you can look at. Peter has included most of his major data structures as parts of the pfc library, which also happens to be highly-optimized.

If I was looking for a performance-based perspective on player development, the first place I'd study would be the foobar2000 SDK.

Advice needed

Reply #3
With such a big list of complicated features (some of which took mature media players out there years to do right) and statements like "I am very new to data structures", I'd suggest you create a simple and stupid player/tag editor/burner first to see how things work, then perhaps use that experience for the big all-in-one project.
Full-quoting makes you scroll past the same junk over and over.

Advice needed

Reply #4
This is a BIG project!  Or, several small/medium projects.  And, it requires programming knowledge in several "specialty areas".  I suggest you start-out small, perhaps with simple program that plays WAV and MP3 files.  Then add features one at a time.  This is just a wild guess, but this project might take a year for an expereinced programmer.  (It would probably take me at least 2 years!)

I agree that open source programs will be a good resource.  There are lots of open source projects at sourceforge.net.  The thing is, most of these projects are huge... perhaps thousands of lines of code, and you are likely to get overwhelmed. 

I found a sample MP3 player program at CodeProject.com.  (I think it might use outdated libraries, but it's a starting-point.)

You'll find lots of information and sample code on MSDN.  Most of the code samples that I've seen from MSDN have been reasonably small (easier to understand than a full open-source project).  But, there is so much information on MSDN, that it can be difficult to find what you are looking for.

The DirectX SDK has tons of documentation and sample code.

There are a few programmers here (programers with audio knowledge), but most Hydrogenaudio members are not programmers.  You might also try the cProgramming.com Windows Forum, or other programming forums.    (I'm suggesting the Windows programming forum because the main C++ forum is mostly for Standard ANSI/ISO C++, and you are going to need additional non-standard libraries for much of this project.) 

One suggestion - When you post questions on cProgramming.com, stick to one topic/question at a time, like "How do I play an MP3 file?"

Advice needed

Reply #5
This is a BIG project!  Or, several small/medium projects.  And, it requires programming knowledge in several "specialty areas".  I suggest you start-out small, perhaps with simple program that plays WAV and MP3 files.  Then add features one at a time.  This is just a wild guess, but this project might take a year for an expereinced programmer.  (It would probably take me at least 2 years!)

I agree that open source programs will be a good resource.  There are lots of open source projects at sourceforge.net.  The thing is, most of these projects are huge... perhaps thousands of lines of code, and you are likely to get overwhelmed. 

I found a sample MP3 player program at CodeProject.com.  (I think it might use outdated libraries, but it's a starting-point.)

You'll find lots of information and sample code on MSDN.  Most of the code samples that I've seen from MSDN have been reasonably small (easier to understand than a full open-source project).  But, there is so much information on MSDN, that it can be difficult to find what you are looking for.

The DirectX SDK has tons of documentation and sample code.

There are a few programmers here (programers with audio knowledge), but most Hydrogenaudio members are not programmers.  You might also try the cProgramming.com Windows Forum, or other programming forums.    (I'm suggesting the Windows programming forum because the main C++ forum is mostly for Standard ANSI/ISO C++, and you are going to need additional non-standard libraries for much of this project.) 

One suggestion - When you post questions on cProgramming.com, stick to one topic/question at a time, like "How do I play an MP3 file?"


Thanks a lot for help and internet sources. Will study them carefully! Thank You

 

Advice needed

Reply #6
I wrote a simple media player myself as a project for a C++ class.  Thing is, like many programmers, I'm as lazy as I can get away with.

I used Qt for well... everything.  UI and Phonon for the audio. Phonon itself is just a wrapper for the native platform's audio system.  Since you're using Visual Studio and that means you are on Windows, it can use DirectShow, VLC or Mplayer for decoding which should pretty much cover any audio format you could want.

This approach probably isn't what you're after if you are more interested in how all that stuff you listed works, but if you're interested in actually getting work done you should leverage as many libraries as you can!

There is an incredible amount of libraries out there (not just Qt), and probably 2-3 would accomplish 99% of what you're after.

As for which data structures to use- keep it simple if you can.  Use the STL! It's doubly-linked lists and vectors should accomplish most of what you need and are easy to use.  And you can use SQLite for the database backend.

If you want to learn, study someone elses' implentation but code it yourself. If you want to get it done, use a library.

Lastly, in case you are wondering what sort of C++ class would let me leverage Qt so heavily in my project- it was an advanced data structures class. What mattered to the teacher is that I wrote the database from the ground up and that searching, playlists and other data manipulation was all my work.  That it had a spiffy GUI and actually, well.. played music was pretty inconsequential.