Posts: 26,215
Joined: Oct 2003
Reputation:
187
i disable videos because i was worried about the performance hit. perhaps a separate option could be implemented here. most video sources are 48khz anyway, so i don't know how useful this would be.
yes, if output to all speakers is enabled, then upsampling still applies.
the reason i didn't go with ssrc is due to the way that we are handling the audio buffers. i'm not 100% sure, but i believe that mplayer likes to know how much audio data it can send (ie how much space we have in the audio buffer that is not already sent to the mcpx) and also likes to know what size chunks to send. the problem with ssrc is that it reads in varying amounts of data based on where it is in the upsampling process (effectively oversampling the data). thus, we'd have to keep a separate buffering system in place to hold the currently resampled data, and the yet to be resampled data. this gets messy, and involves quite a bit of memory shuffling.
once i found out that mplayer could do it directly, i figured i'd test it out, and seeing as it passed a few of my tests, i figured it was good enough for now.
once others have tested, we should get a better idea of how it compares to ssrc. note that 48khz is still passed direct (no upsampling needed, ofcourse) so you can compare the mplayer upsample to a 48khz ssrc upsampled version easily enough.
i've kept the code i've done so far for ssrc, so if we need to go back to it, we can.
cheers,
jonathan
Posts: 5,008
Joined: Sep 2003
Reputation:
30
pike
Team Kodi Admin
Posts: 5,008
btw, does this also work for cdda? i've just compiled a build and will test shortly
Posts: 26,215
Joined: Oct 2003
Reputation:
187
no - only mplayer currently.
i'll have a bit of a play with a buffering method for ssrc this weekend. it's just a matter of balancing the amount of data given to us by mplayer and the amount that we output (which are ofcourse different when we're resampling.)
the problem i think is that mplayer is not designed with only audio in mind. when you just have audio, all you have to worry about is just keeping up with the output rate. when video is added to the mix, then things get quite a bit more complicated!
the ultimate would be a standalone audio core.
Posts: 5,008
Joined: Sep 2003
Reputation:
30
pike
Team Kodi Admin
Posts: 5,008
hear hear!
someone (*cough*) oughta look into porting foobar. can it get any better? i think not.
Posts: 163
Joined: Oct 2003
Reputation:
0
should this potentially mean dts audio cd's should finally work?
for now, xbmc doesn't recognize the higher sample wav's. maybe we should just add another extention to it to differentiate between a 41 and 48k wav?
Posts: 5,008
Joined: Sep 2003
Reputation:
30
pike
Team Kodi Admin
Posts: 5,008
@ mvoosten, at this moment, no.
we still lack a dts audio decoder, if you happen to know of a non alpha opensource one, please let us know
Posts: 163
Joined: Oct 2003
Reputation:
0
mmm, but pike, when you play a dts encoded movie, that just outputs fine as a dts stream, so why should we need a seperate audio decoder to get dts wav's to work?
Posts: 247
Joined: Oct 2003
Reputation:
0
jmarshall, i hope you won't forget about being compatible with 2 channel digital out?
i hope the &^%& sounds at the start will go away for me after you did all this stuff.
this is not just because i have a 2 channel receiver, but it would allow digital recordings on cd, minidisc, dcc, mp3 players etc.
Posts: 26,215
Joined: Oct 2003
Reputation:
187
an update:
i've just committed the latest version to cvs.
now we're using ssrc code instead of mplayer. seems to be working fine.
i've added a gui option in settings->music which allows you to turn it on for music only, or for both music and videos.
we're currently running things through the mcpx still - means we get volume control in hardware, plus ability to eq or whatever at a later date.
still doesn't work for cd playback - reason is that the directsound stuff for that is buried within cdrip.lib. i'll rip it out of there and put it within xbmc so that it's handled the same way. that'll take a wee while though.
please test the new version and let us know how it works!
mrmario:
i'm still not 100% sure what is going on with your system. it may be due to the 6 channel opening up asyncdirectsound() with mixbins set so that it tries to output ac3. seems bizarre that it allows it though, given that i assume you have ac3 and dts disabled in the ms dash. perhaps you could force it to not open asyncdirectsound in audio.cpp if the number of channels is more than 2. that'll help narrow it down.
Posts: 247
Joined: Oct 2003
Reputation:
0
well, i do have dd enabled in msdash cause otherwise i could not do those tests for you (it does not allow passthrough then).
with dd not turned on i do not get the ^^&%&^ sounds, but it does not passthrough.
however, it should not be a problem since mod, sid etc play fine with this setting. only stuff played with mplayer does this.
i would be happy to disable the dd ,wich would make sence since i do not have dd, if i can enjoy the 48khz upsampling then and that i know the digital out is still in full use (like 2channel passthrough since xbmc says analog).
if you can clarify it would be great.
good job jmarshall!!
Posts: 761
Joined: Dec 2003
Reputation:
0
Butcher
Retired Developer
Posts: 761
mod and sid never passthrough - they have their own sound output code that is separate from the mplayer stuff. the mod stuff in particular uses the mcpx to do all it's resampling and mixing so i can't pass through (and no, we can't software resample mods, 100 channels is too much for the xbox cpu).
Posts: 5,008
Joined: Sep 2003
Reputation:
30
pike
Team Kodi Admin
Posts: 5,008
i've noticed that while playing music there's no output to the visualizer, is this something you will look at also?
:d