What i am trying to do is basically to make a beeping sound from both the internal speaker and from the sound card simultaneously.
When you say "from the sound card", I take it you mean the speakers you hook up to the sound card. Correct?
Also, you're just trying to create sounds on your own, and not alter how sound is played by existing applications. Correct?
I would think the capability to output on both sets of speakers is hardware-dependent. Please dump the most verbose output of lshw and lspci as you can (feel free to sanitize); do a quickie read of --help and man to see how it's done. Then maybe someone else can take over.
Hint: place a link to your most important unsolved problem in your sig. More eyeballs = faster fixes