[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnuradio-discuss
Subject:    Re: [Discuss-gnuradio] Audio sink + windows binaries
From:       Geof Nieboer <gnieboer () corpcomm ! net>
Date:       2017-10-26 3:13:01
Message-ID: CALVApvOVzednR3Xz6RYZZ7aO=KFiXtANqRxuMeWtWXQhnJj=Vg () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


It seems the problem resides in the relationship between the wav file
source and the windows audio sink.

The win audio sink is playing "live" audio fine
The wav file sink can record that same audio to a file
That file plays back fine in VLC.

These steps appear to validate that audio sink is working as expected...

However, that file is returning an error when playing in the wav file
source in GRC, that it does not contain any samples.  So that's not
helpful.  Then when playing the pre-recording file from you, I get the same
distortion you are.  But the WAV file source is not windows-unique (unlike
the audio sink/source).

SO, the only thing different about the file sources is that they are
un-throttled.  So of course you'd set "Ok to block" in the audio sink,
which was implemented in a later update to the windows audio sinks.  If I
recall correctly, the windows WAVE_MAPPER device did some odd things during
testing... like when pushed too many samples, it would internally drop
excess samples without reporting anything to the calling code about the
overrun, until pushed past 96KHz, though I also found some of that behavior
was driver-dependent.  But frankly it's been some time since I re-wrote the
sinks, so I don't recall for certain.

Unfortunately the quick testing and playing around with throttle rates,
channels, and sample rates didn't fix anything, so in the end I don't have
a good answer.  The only likely possibility is various minor differences in
types and implementation between GCC and MSVC that could have affected the
wav file source, but again, a quick scan of the source didn't show a
smoking gun.

If you come up with more data points during troubleshooting, I'll see what
I can do.

Geof



On Wed, Oct 25, 2017 at 6:12 PM, Achilleas Anastasopoulos <anastas@umich.edu
> wrote:

> Great Geof,
>
> thanks for the feedback!
>
> The wav file was downloaded from the internet and the data file was
> generated by the simple matlab script that is also present in the
> Dropbox directory I provided: essentially it opens the wav file, reads the
> samples, extracts only one of the two channels and saves the data in
> float32 format.
>
> Just to clarify: both files (data and wav) are played perfectly OK on my
> Linux Box, so the issue is not with wav vs data but with Linux vs Windows.
>
> thanks again,
> Achilleas
>
>
>
>
>
>
>
>
>
> On Wed, Oct 25, 2017 at 5:28 PM, Geof Nieboer <gnieboer@corpcomm.net>
> wrote:
>
>> Achilleas,
>>
>> I have duplicated the problem with the same setup, playing the .data file
>> w/ the file source, and also playing the wav file with the wav file source
>> produces similar distorted results.
>>
>> However, I don't have a quick solution to return.  I'll need to keep
>> looking.
>>
>> Can you describe how you created the .data file and .wav files?
>>
>> Geof
>>
>> On Wed, Oct 25, 2017 at 4:22 PM, Achilleas Anastasopoulos <
>> anastas@umich.edu> wrote:
>>
>>> Hi Marcus,
>>>
>>> thanks for offering to help.
>>>
>>> As i say in my email the audio file sounds with a different speed than
>>> the original!
>>>
>>> I have added a new file in the Dropbox link that I sent last time,
>>> "experiment.m4a"
>>> If you play it you'll hear the two different sounds: one from my
>>> standard wav player and the other from within grc.
>>>
>>> thanks again,
>>> Achilleas
>>>
>>> _______________________________________________
>>> Discuss-gnuradio mailing list
>>> Discuss-gnuradio@gnu.org
>>> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>>>
>>>
>>
>

[Attachment #5 (text/html)]

<div dir="ltr">It seems the problem resides in the relationship between the wav file \
source and the windows audio sink.<div><br></div><div>The win audio sink is playing \
&quot;live&quot; audio fine</div><div>The wav file sink can record that same audio to \
a file</div><div>That file plays back fine in VLC.</div><div><br></div><div>These \
steps appear to validate that audio sink is working as \
expected...</div><div><br></div><div>However, that file is returning an error when \
playing in the wav file source in GRC, that it does not contain any samples.   So \
that&#39;s not helpful.   Then when playing the pre-recording file from you, I get \
the same distortion you are.   But the WAV file source is not windows-unique (unlike \
the audio sink/source).</div><div><br></div><div>SO, the only thing different about \
the file sources is that they are un-throttled.   So of course you&#39;d set &quot;Ok \
to block&quot; in the audio sink, which was implemented in a later update to the \
windows audio sinks.   If I recall correctly, the windows WAVE_MAPPER device did some \
odd things during testing... like when pushed too many samples, it would internally \
drop excess samples without reporting anything to the calling code about the overrun, \
until pushed past 96KHz, though I also found some of that behavior was \
driver-dependent.   But frankly it&#39;s been some time since I re-wrote the sinks, \
so I don&#39;t recall for certain.</div><div><br></div><div>Unfortunately the quick \
testing and playing around with throttle rates, channels, and sample rates didn&#39;t \
fix anything, so in the end I don&#39;t have a good answer.   The only likely \
possibility is various minor differences in types and implementation between GCC and \
MSVC that could have affected the wav file source, but again, a quick scan of the \
source didn&#39;t show a smoking gun.</div><div><br></div><div>If you come up with \
more data points during troubleshooting, I&#39;ll see what I can do.    \
</div><div><br></div><div>Geof</div><div><br></div><div><br></div></div><div \
class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 25, 2017 at 6:12 PM, \
Achilleas Anastasopoulos <span dir="ltr">&lt;<a href="mailto:anastas@umich.edu" \
target="_blank">anastas@umich.edu</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr">Great Geof,<div><br></div><div>thanks for the \
feedback!</div><div><br></div><div>The wav file was downloaded from the internet and \
the data file was generated by the simple matlab script that is also present in the  \
</div><div>Dropbox directory I provided: essentially it opens the wav file, reads the \
samples, extracts only one of the two channels and saves the data in float32 \
format.</div><div><br></div><div>Just to clarify: both files (data and wav) are \
played perfectly OK on my Linux Box, so the issue is not with wav vs data but with \
Linux vs Windows.</div><div><br></div><div>thanks \
again,</div><div>Achilleas</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><div \
class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div \
class="gmail_quote">On Wed, Oct 25, 2017 at 5:28 PM, Geof Nieboer <span \
dir="ltr">&lt;<a href="mailto:gnieboer@corpcomm.net" \
target="_blank">gnieboer@corpcomm.net</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr">Achilleas,<div><br></div><div>I have \
duplicated the problem with the same setup, playing the .data file w/ the file \
source, and also playing the wav file with the wav file source produces similar \
distorted results.</div><div><br></div><div>However, I don&#39;t have a quick \
solution to return.   I&#39;ll need to keep looking.</div><div><br></div><div>Can you \
describe how you created the .data file and .wav \
files?</div><div><br></div><div>Geof</div></div><div class="gmail_extra"><br><div \
class="gmail_quote"><div><div class="m_1923964783284358892h5">On Wed, Oct 25, 2017 at \
4:22 PM, Achilleas Anastasopoulos <span dir="ltr">&lt;<a \
href="mailto:anastas@umich.edu" target="_blank">anastas@umich.edu</a>&gt;</span> \
wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div \
class="m_1923964783284358892h5"><div dir="ltr">Hi Marcus,<div><br></div><div>thanks \
for offering to help.</div><div><br></div><div>As i say in my email the audio file \
sounds with a different speed than the original!</div><div><br></div><div>I have \
added a new file in the Dropbox link that I sent last time,  \
</div><div>&quot;experiment.m4a&quot;</div><div>If you play it you&#39;ll hear the \
two different sounds: one from my standard wav player and the other from within \
grc.</div><div><br></div><div>thanks again,</div><div>Achilleas</div></div> \
<br></div></div>______________________________<wbr>_________________<br> \
Discuss-gnuradio mailing list<br> <a href="mailto:Discuss-gnuradio@gnu.org" \
target="_blank">Discuss-gnuradio@gnu.org</a><br> <a \
href="https://lists.gnu.org/mailman/listinfo/discuss-gnuradio" rel="noreferrer" \
target="_blank">https://lists.gnu.org/mailman/<wbr>listinfo/discuss-gnuradio</a><br> \
<br></blockquote></div><br></div> </blockquote></div><br></div>
</div></div></blockquote></div><br></div>



_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic