48kHz direct digital output
#31
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
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#32
btw, does this also work for cdda? i've just compiled a build and will test shortly
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#33
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.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#34
hear hear!

someone (*cough*) oughta look into porting foobar. can it get any better? i think not.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#35
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?
Reply
#36
@ 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
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#37
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?
Reply
#38
reason is simple we can output dts streams from movies - they are in 48khz where's dts audio cd's are in 44.1khz. the xbox hardware can only passthrough 48khz unfortunately. thus the dts audio cd's would need to be decoded to pcm before we could output it Sad
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#39
not enirely true...
a lot if dts audio cd's are 48khz and not downsampled to 41khz.
for example see this list of available titles: http://consumers.umusic.com/dvda/releases.html

m.
Reply
#40
those albums you listed are either sacd (super audio cd) or dvda (dvd-audio).

dts audio cds are different. they can only be 44.1khz. what happens is that the 5 44.1khz streams are encoded to a dts 44.1khz stream and then popped onto a cd. it can then be played by any cd player with a digital output. a dts receiver will recognise that it is a dts stream and not a pcm stream and decode. they have to be 44.1khz to play back in a regular cd player.

one thought i had was packing out the stream with zeros and see if that works. (i believe this is what is done on dts tracks recorded at 768kbits/s, but i may very well be wrong!Wink

i certainly don't have time to play around with this at the moment though.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#41
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.
Reply
#42
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.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#43
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!!
Reply
#44
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).
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#45
i've noticed that while playing music there's no output to the visualizer, is this something you will look at also?

:d
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply

Logout Mark Read Team Forum Stats Members Help
48kHz direct digital output0