I want to increase/decrease volume of audio file using the slider,is it necessary to run audio data from slider?
古いコメントを表示
global filename;
[y,Fs] = audioread(filename);
slider_val = get(hObject, 'Value');
if slider_val == 0
x = y/5; % Decrease volume
player = audioplayer(x, Fs);
play(player,[1 (get(player, 'SampleRate')*3)]);
elseif slider_val == 1
x = y*5; % Increase volume
player = audioplayer(x, Fs);
play(player,[1 (get(player, 'SampleRate')*3)]);
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Audio and Video Data についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!