Surround sound

Hi,
Does support surround sound, more than two channels?
If yes, how I can set up it?

Thanks

I forgot to add
mocp --version

This is : Music On Console
Version : 2.5.0-beta1
Built : May 26 2013 05:47:43
Compiled with : OSS ALSA JACK DEBUG Network streams resample
Running on : Linux 3.11.0-14-generic x86_64

Check this thread: http://moc.daper.net/node/359 (it's rather old).

MOC now supports multichannel audio, however the main problem is that ffmpeg decoder does not (it forces downsampling). In my opinion, it's not the right way to do it, but there are yet no channel conversion routines in MOC code, so it was chosen probably as a best solution for the biggest group of users. If jcf gives me green light, probably I'll submit some work on this subject continuing patch described here http://moc.daper.net/node/901 in next version of MOC.

I did some testing on the subject in the past but I forgot most of the results by now. I have some working setting right now with "dts cd" stuff. From a quick glance at the code, I see that most other decoders (like sndfile, flac, vorbis) support multichannel and iirc play nice without any additional setup (apart from proper choice of AlsaDevice). However it is ffmpeg which handles ac3 and dts streams...

Tell me more what you try to achieve and I could try to help.

If jcf gives me green light, probably I'll submit some work on this subject...

Yeah, go for it.

... there are yet no channel conversion routines in MOC code...

WRT FFmpeg in particular, check out what's available in its utilities (libavutil) or resampling (libavresample) libraries.

Quote: Yeah, go for it.

Ok, when/if some of those initial audio formats related get commited in 2.6, I'll try to figure out a way move channel count conversions out of decoder_plugins.

Quote: WRT FFmpeg in particular, check out what's available in its utilities (libavutil) or resampling (libavresample) libraries.

No! You shouldn't use ffmpeg.c to do it. It's not decoder thing. I think you would like to have a ffmpeg dependency in another separate place of MOC code (dark side...) or to rework decoder API to allow passing information about intended/prefered/expected format to plugin. Down/up-mixing isn't especially tricky - it's just summing up with different coeffients. You just have to take care of all possible scenarios. In my patch I put 5.1 -> 2.0 code as a trial case. I suppose there is some "standard" library to do this, I'll investigate when we get there.

On the other hand: ac3 and dts passthrough would require some deeper changes. I don't even know how it is done yet.

I have the sound card that supports 6 channels. I have acoustic system, that gives me surround sound five.one. What can prevent me to get surround sound? :) I just want to get multichannel sound. VLC gives me this kind of sound

Thanks

What files are you playing? Digital or analog setup? Passthrough or decoding?

I keep getting this
The word verification was not completed correctly. Please complete this new word verification and try again. If you feel this is in error, please report that you are blocked.
I just want put my text, but I can't do it. Why?

It seems that for some reason it was classified as "spam". I found in logs that you intended to post a link to file info: ftp://ibatrak.freenet.com.ua/upload/info.txt. I just glanced at source code of wavpack decoder and it seems it also forces audio in 2 channels. It shouldn't be hard to fix, but I'll need to test it a bit.

hm... how you found the source file (Metallica_-_Black_Album_-_02.wv)? :)

You should protect your ftp better. I wanted to ask you to upload a sample for me to test on and thought that maybe you just did that. Just went up the path and found it ;)

As a quick fix: decompresing the file to wav or recompressing to flac should do the trick. However I got only static, noise or slowdowns on my system. I'll investigate further.

Ok :)
It seems for me, that I didn't leave path to the audio file. Oh, well..

You can find a patch here: http://tomaszg.pl/moc/moc-2.5.0-beta1-multichannel.patch

Put it in MOC sources directory, execute command:

patch -p0 < moc-2.5.0-beta1-multichannel.patch

and recompile sources. It is not final solution, so please report back any issues you may encounter. It fixes both WaVpack and FFmpeg decoder to produce multichannel audio.

Note that sometimes ALSA/soundcard is unable to handle some combinations of samplerate, sample format and channel count. In my case, 96/24/5.1 files wouldn't play producing error "Can't set audio parameters". It is not MOC limitation, so if you encounter that problem, you could consider downsampling to 48kHz (see http://people.xiph.org/~xiphmont/demo/neil-young.html for rationale).

I'm sorry, I was inaccessible during some time :(

I tried your patch on WavPack and Digital Theater Systems (DTS) formats and moc plays multichannel audio properly. I'm happy :)

Thank you very much