avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Operation problem


From: Gerard Marull Paretas
Subject: Re: [avr-gcc-list] Operation problem
Date: Sat, 11 Aug 2007 23:50:09 +0200

Hi Dave.

You've just solved my problem :). Casting the two members of the multiplication to uint32_t solves the problem. I had tried to cast the whole multiplication, but not each member. Another thing learned.

So the code now looks like this:

currentsong.length = ((uint32_t)currentsong.frames * (uint32_t)currentsong.samples_per_frame) / currentsong.samples_per_sec;


Thanks! Gerard.
reply via email to

[Prev in Thread] Current Thread [Next in Thread]