Reset datastore read pointer to start of data
reset(ADS)
example
reset(ADS) resets the datastore read pointer to the start of the data. Resetting allows re-reading from the same datastore.
ADS
collapse all
Create an audioDatastore object ADS.
audioDatastore
folder = fullfile(matlabroot,'toolbox','audio','samples'); ADS = audioDatastore(folder);
While the datastore has unread files, call read in a loop to read files sequentially.
read
while hasdata(ADS) data = read(ADS); end
Reset the datastore to the state where no data has been read from it. Read the first file from the datastore.
reset(ADS) data = read(ADS);
Specify ADS as an audioDatastore object.
You have a modified version of this example. Do you want to open this example with your edits?