Jump to content

Confused

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
11 replies to this topic

#1
BINNY88

BINNY88

    Learning Programmer

  • Members
  • PipPipPip
  • 38 posts
I want to da a simple audio player in c++.I just cant figure out how the programmers use c++ to write a media player.I only know how to find the sum of 2 nos & all the mathematical stuff. can anyone point me in the write direction.
(ps. it only needs to play a single format eg.wav & i want to be a console app.)
Thanks

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
You'll have to do a LOT of research. You'll need to hook into the audio subsystem of your target OS, decode the .wav file, and push the result from the .wav file to the audio subsystem. From what you're saying, you would do better to learn more about C++ first.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
Guest_Jordan_*

Guest_Jordan_*
  • Guests
You could use some libraries already built by others such as :CLAM:. Here are two links:

SourceForge.net: C++ class library for manipulating audio
..::CLAM::.. C++ Library for Audio and Music

#4
BINNY88

BINNY88

    Learning Programmer

  • Members
  • PipPipPip
  • 38 posts
Well winged panther.I am a computer engineering student,my syllabus is a bit outdated they didnt even see the end of the cmd interface or dos.My target os is windows.I do have a pretty good knowledge of c++.The only thing is i dont know where to get started
ie.the code to open an or recognise an audio file.I am only used to console applications not real world programs.I have to learn it anyway so why not get started now.Even a hard disk eraser program would do well for me .I just need a few suggestions or links.
Any help in that direction will be very much appreciated.

Thanks

#5
BINNY88

BINNY88

    Learning Programmer

  • Members
  • PipPipPip
  • 38 posts
Thanks for the links Jordan.But what i am looking for is the basic concept for writing real world applications.an audio player is just an example.well if i can make one it will be music to my ears

#6
MeTh0Dz

MeTh0Dz

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,119 posts
Learn C++.

#7
Guest_crispian123_*

Guest_crispian123_*
  • Guests
why r u confused man ..

#8
BINNY88

BINNY88

    Learning Programmer

  • Members
  • PipPipPip
  • 38 posts
Why am i confused well,simple i dont know where to start. All the programming i learned was to study basic data structures & to add and multiply nos, u know 'arithmetic'.But what arithmetic does an mp3 player need????How is an audio file represented in c++??is it an array? a linked list?or something else?How do you convert that data to sound??What is the algorithm to do that?Do we need to know about the hardware of the sound card of the computer?

#9
Steve.L

Steve.L

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 444 posts
I don't think you know C or C++ well enough to tackle such a complicated project. You should learn more advanced topics in the language, and keep building up your coding skills... For a music player, I think you'd actually be better off going with a different language, such as Java, Python, or even C#. I'm actually a big fan of Python, it has huge potential.

#10
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
Things you will probably want to research:
1) file access
2) DirectX (for the audio output)
3) .wav file specification.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#11
BINNY88

BINNY88

    Learning Programmer

  • Members
  • PipPipPip
  • 38 posts
Okay I guess my knowledge of the c language must be limited or must be very basic.I have heard of pyhton but right now i am confined to C++.Now what are the advanced topics in the c language???Can anyone recommend any books on the subject.I want the player as a console application. Do i need to know about direct x for that?

Thanks


#12
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
You need either directX or windows API calls.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog