Thank you for the reply. Finally I figure out the problem. The code is OK,
but I thought it should be louder. So when I was multiplying t by 2, I could
not hear the difference from my laptop speaker. But after multiplying PCM
data by 20, I heard a significant difference.
Best,
Dripsotne
On Tue, O
On Mon, 2009-10-26 at 17:53 -0700, Drip Stone wrote:
>
> I pasted all the code at http://pastebin.com/m7fdf0957.
OK! Aside from the C++ style of declaring iterators, I just made this
change in (or around) line 126 to raise left channel by 6 dB:
-8<---
and test .wav file is at
http://gamma.cs.unc.edu/SOUNDC/Assignments/clapping!_2.wav
On Mon, Oct 26, 2009 at 5:50 PM, Drip Stone
wrote:
> Hello again,
>
> I obtain data for fbuffer in following way:
> char *fbuffer = ( char * ) malloc ( 1024 ); //10M bytes
> long length = fread ( fbuff
Hello again,
I obtain data for fbuffer in following way:
char *fbuffer = ( char * ) malloc ( 1024 ); //10M bytes
long length = fread ( fbuffer, 1, 1024, file );
I also set alsa in float mode:
snd_pcm_hw_params_set_format ( handle, params,
SND_PCM_FORMAT_FLOAT_LE );
I pa
Nothing in the posted code fragment suggests that neither in nor out is
remotely related to floats. Where do you get yor in-data from? Why is
fbuffer[] a bytearray (if that is what it is?) How was ALSA opened?
/j
On Mon, 2009-10-26 at 15:05 -0700, Drip Stone wrote:
> while ( 1 )
> {
>
On Mon, 2009-10-26 at 15:05 -0700, Drip Stone wrote:
> Hi,
>
> Thank you for providing valuable information. I will put some code
> here:
>
> while ( 1 )
> {
> for ( int i = 0; i < frames; i++ )
> {
> float t = 0;
> if ( left )//for left channel
Hi,
Thank you for providing valuable information. I will put some code here:
while ( 1 )
{
for ( int i = 0; i < frames; i++ )
{
float t = 0;
if ( left )//for left channel
{
t = *((float*)&(fbuffer[pos+i*4]));//4 b
On 10/26/2009 11:38 AM, Victor Lazzarini wrote:
> Well if the audio was clipped, there would probably be some audible
> distortion.
> Perhaps if a code fragment was posted we could give a more informed
> opinion.
i was thinking of operating on files, where clamping can be done with
perfect fideli
Well if the audio was clipped, there would probably be some audible
distortion.
Perhaps if a code fragment was posted we could give a more informed
opinion.
Victor
On 26 Oct 2009, at 09:08, Jörn Nettingsmeier wrote:
> On 10/26/2009 07:33 AM, Drip Stone wrote:
>> Hi everybody,
>>
>> I have a qu
On 10/26/2009 07:33 AM, Drip Stone wrote:
> Hi everybody,
>
> I have a question regarding amplifying a PCM frame. For each frame, I
> get a float number, and multiply this number by 2, and then output
> frames to alsa one by one using function snd_pcm_writei. But the wav
> file sounds the same to m
Hi everybody,
I have a question regarding amplifying a PCM frame. For each frame, I get a
float number, and multiply this number by 2, and then output frames to alsa
one by one using function snd_pcm_writei. But the wav file sounds the same
to me, nothing gets amplified. Could anyone explain this
11 matches
Mail list logo