Is it possible to save audio sample values from alteration while using wavwrite function?
Info
This question is closed. Reopen it to edit or answer.
Show older comments
Hello, I am manipulating values of audio samples for audio steganography.When i have my manipulated audio sample object, i want to write it as a new audio file using wavwrite. But when i create object of this newly created audio file, i find sample values different from the previous values of samples which i had manipulated.
Is there any method to control wavwrite function in order to keep my sample values as same as these were before wavwrite?
My original audio object is:
>> y=wavread('C:\Users\HIM\Desktop\audio stegno\strings.wav');
>> y(1:7)
ans =
1.0e-003 *
0
0
-0.2136
0.0916
0.3052
0.3052
0.2136
New audio object created:
>> y2=y;
>> y2(1:7)=0.0005;
>> y2(1:7)
ans =
1.0e-003 *
0.5000
0.5000
0.5000
0.5000
0.5000
0.5000
0.5000
>> wavwrite(y2,44100,'k.wav') >> s=wavread('k.wav'); >> s(1:7)
ans =
1.0e-003 *
0.4883
0.4883
0.4883
0.4883
0.4883
0.4883
0.4883
Values of samples changed in object 's'.
I want that values of samples in 's' should remain same like in 'y2'.
Answers (1)
This question is closed.
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!