problem with loadwave and savewave

classic Classic list List threaded Threaded
3 messages Options
Zujiang Zujiang
Reply | Threaded
Open this post in threaded view
|

problem with loadwave and savewave

Hi,
I am using Scilab 5.4.1. I have a problem with loadwave and savewave functions. Here is my code:

z=[0.2404861 -0.2386475 0.0726242];
savewave('t1.wav',z);
z1=loadwave('t1.wav'); z1

z1  =
 
    0.2404785  - 0.2386475    0.0726013  

here you can see the data is not same. I am not sure it is a bug or there is some limits on wave file. Any help will be
appreciated.

Thanks,
Zujiang
Stanislav Stanislav
Reply | Threaded
Open this post in threaded view
|

Re: problem with loadwave and savewave

13.09.2013 06:38, Zujiang пишет:
> Hi,
> I am using Scilab 5.4.1. I have a problem with loadwave and savewave
> functions. Here is my code:
>
> z=[0.2404861 -0.2386475 0.0726242];
> savewave('t1.wav',z);
>
Hi.
If you provide 'rate' and 'nbits' for 'savewave' the result will be better.
For example:
savewave('t1.wav',z,22050,32);
z1=loadwave('t1.wav');
-->z-z1
  ans  =

  10^(-9) *

     0.1496136    0.0530481    0.4419506


Stanislav
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Zujiang Zujiang
Reply | Threaded
Open this post in threaded view
|

Re: problem with loadwave and savewave

Hi Stanislav,

Thanks for your reply. Now I see it's the conversion accuracy between wave file and scilab program.
Thanks again.

Zujiang