First simple audio ripping can be done but the really good audio rippers can easily turn around and hack the audio of a DS game like any other hacker. This is what I suggest you aim for as it will make life easier in the long run.
Some games use wave files (electroplankton), some use ADX/AHX (TWEWY but many more if you look at the developers site), some use PCM (N+) but most use SDAT. Each of these methods (not to mention general audio ripping) has been covered in far more detail in the past (do a search using the bottom search box in this section) but I have 10 minutes now so
Several tools for SDAT exist
The big 4 these days are
ndssndext
http://www.4shared.com/get/68276816/809222...sndext_v04.html
crystaltile2
http://gbatemp.net/t232718-crystaltile2-2010-06-12
vgmtrans
http://hcs64.com/mboard/forum.php?showthread=17715
older version:
http://www.4shared.com/get/76520093/5a299676/VGMTrans.html
Also poke around
http://hcs64.com/vgm_ripping.html
console tool by lowlines
http://www.romhacking.net/forum/index.php/topic,8407.60.html
There are tools to put things back together but most people go by hand, on the other hand there are tools to convert more common formats into SDAT compatible formats. See midi2sseq (there was an old tool called sseq2midi but it has been eclipsed by the others)
http://sites.google.com/site/kiwids/
Also
http://gbatemp.net/index.php?showtopic=243430&hl= and between those two and some specs on the SDAT format (and possible source code for some of these programs) and derivatives you should be good to go from PC formats to DS formats.
It is worth having each on hand as there are three main sound formats
sseq- a midi like sound format that most tools convert to midi often with a bit of difference.
swar- a sample based sound format usually made up of small almost wave files
strm- long audio streams occasionally outside the SDAT container. These are pretty much wave files.
Each of these has support (SSEQ uses sbnk) and cousin formats (SWAR is a collection of individual SWAV files which are the actual samples) so see See also
http://gbatemp.net/t253947-nintendo-sdat-specifications for links and info on such matters.
If you do not feel like clicking on that link (it has data backed up from a dead site now) then
http://llref.emutalk.net/nds_formats.htm#SDAT
http://kiwi.ds.googlepages.com/sdat.html (he also does a decent spec on the 3d format
http://kiwi.ds.googlepages.com/nsbmd.html )
Have a little gander at
http://www.romhacking.net/forum/index.php/topic,8407.60.html as well as you will soon see these tools may not be perfect and that covers a lot of why it happens.
3.5mm male male jacks are an option as well as is using the loopback function of your soundcard (you might be able to abuse FFDshow as well) on an emulator.
Bonus with an emulator is you can drop given channels of audio- no SFX overlayed and occasionally no backing beat if you just want a song.
Even more bonus points is you can do more conventional hacking on the SDAT and have what you want to play actually play when you want it to (you do not have to play through a game to see the ending music or something like that if you do not want to)-
http://gbatemp.net/index.php?showtopic=122534&hl=
Equally if you do need to play the game a bit you can undub the US version of a rom and grab the sounds from there (it is usually just a simple file replacement).
Finally there was something happening on the playback in winamp front- many old consoles have support via various plugins in winamp but I have not paid attention to winamp since the late 1990's so I will bow out.