|
From: Jan S. <ha...@st...> - 2013-11-06 07:36:15
|
On Nov 05 22:41:15, mar...@mu... wrote: > > If you play it with > > play -V5 /sounds/amen-break_omsox6.ogg > > doe it play right? What does the output say? > > Nope, it sounds the same (i.e. the DC click). Here's the output: > Last login: Tue Nov 5 19:01:58 on ttys001 > Marlons-MacBook-Pro:~ Marlon_MBPro3$ /Users/Shared/Downloads/_Safari/sox-14.4.1/play -V5 /sounds/amen-break_omsox.ogg -d No. You want to play your ogg file, not "play" the default device. Do just "play -V6 /your/file.ogg" (skip the -d). > Input File : '/sounds/amen-break_omsox.ogg' > Channels : 1 > Sample Rate : 48000 This is what you want to play. > Input File : 'default' (coreaudio) ^^^^^^^ > Channels : 2 > Sample Rate : 44100 Here you are trying to "play" the device. > /Users/Shared/Downloads/_Safari/sox-14.4.1/play INFO formats: can't set sample rate 48000; using 44100 > /Users/Shared/Downloads/_Safari/sox-14.4.1/play INFO formats: can't set 1 channels; using 2 I have seen the same on MacOSX 10.5.8 - the audio system (coreaudio) is different there (as usual with Apple); but I believe Chris has already fixed some bits. > > > >> However, this ogg file can be imported and played back normally > >> in other software, like Audacity or VLC. > > > > That means SoX convertred the WAV into the OGG just fine. > > Yes! And since these other player can play it back with no problem > I suspect there might be something wrong with the ogg decoding. I doubt that. I think tlaks wrong to the audio _device_. The processing of the audio samples is surely OK. > However, it doesn't seem to be the playback only, > e.g. if I invoke sox to convert the .ogg file back into a .wav, > the resulting file really just contains samples at -1. > >> For converting the .ogg file back into wav I do: > >> sox -V6 "/sounds/amen-break_omsox6.ogg" "/sounds/amen-break2.wav" > >> > >> -> the resulting .wav file looks like what it sounded like when trying to play back, i.e. a DC value of -1 for the duration of the sound (SR 48kHz, 16bit WAV) > > > > "Looks"? > > Sorry, I didn't precise. > I meant the waveform display What waveform display? > shows a line at the negative end (the sonagram shows What sonagram? > no energy in the frequency spectrum except DC). > > > How does the resulting WAV file play with 'play -V5'? > > It plays it back correctly, i.e. the DC in the file. > I've attached the printout: > > Marlons-MacBook-Pro:~ Marlon_MBPro3$ /Users/Shared/Downloads/_Safari/sox-14.4.1/play -V5 /sounds/amen-break_omsox.wav -d Same mistake again: this is not how you play a file with play(1). > One strange thing I noticed though when invoking 'play' is that > after playback it goes into 'interactive' mode, i.e. audio input > from the audio devices is routed to audio output > (you can see this at the end of the printout > - maybe it's due to the -V5 option) - that's why I need to manually break it. Well, that's exactly what you told it to do with "play ... -d". I wouldn't be surprised if your problems went away once you just play the file right. > > What has changed? Did it work for you on > > previous versions of MacOSX? > > Yes, I just verified: it works with the MacOS binary 14.3.2. Hm, perhaps the fixes Chris made when I was bitching about 14.3.2 not playing on MacOSX 14.3.2 broke things in 14.4.1 for _your_ version of MacOSX. I blame Darwin of course. > > What kind of 14.4.1 is it? > > The binary distribution from SoX homepage? > Yes, got it from here: > http://sourceforge.net/projects/sox/files/latest/ I only have Darwin 8.11.0 (MacoSX 10.4.11) to test on now; I will try with both 14.3.2 and 14.4.1 and get back. Jan |