|
|
@ -3,7 +3,7 @@ function frameType = SSC(~, nextFrameT, prevFrameType) |
|
|
|
% Usage frameType = SSC(frameT, nextFrameT, prevFrameType), where: |
|
|
|
% Inputs |
|
|
|
% - frameT is a frame in the time domain, containing both channels of |
|
|
|
% the audio stored in an array of dimensions 2048X2 |
|
|
|
% the audio stored in an array of dimensions 2048X2 |
|
|
|
% - nextFrameT is the next frame in the time domain, containing both |
|
|
|
% channels of the audio stored in an array of dimensions 2048X2 |
|
|
|
% - prevFrameType is the type of the previous frame in string |
|
|
@ -33,7 +33,7 @@ function frameType = SSC(~, nextFrameT, prevFrameType) |
|
|
|
channelFrameType = {'nan', 'nan'}; |
|
|
|
for channel = 1:2 |
|
|
|
% Calculates sub-frame energy estimation |
|
|
|
[subFrames, ~] = buffer(nextFrameT(449:end - 448, channel), 256, 128, 'nodelay'); |
|
|
|
[subFrames, ~] = buffer(nextFrameT(577:end - 448, channel), 128, 0, 'nodelay'); |
|
|
|
energyEstimations = sum(subFrames .^ 2, 1); |
|
|
|
|
|
|
|
% Calculates the ratio of the sub-frame energy to the average energy of |
|
|
|