function sol_play_am()
% This script demodulates and plays the AM signal stored in am_signal.mat.

close all;
clear all;

function_mapper; % sets up the function handles

% Downsampling factor as in the Hw statement
downsamplingFactor = 10;

% Load the samples, fc and fs from file
load('am_data.mat');

% Demodulate and play
sdm = hw1_amdemod(am_signal, fc, fs);
sound(downsample(sdm, downsamplingFactor), fs / downsamplingFactor);

end
