Playing audio file using Due

I have a task in which I have to load an audio file and play it with arduino due using the dac pin and an 8 ohm speaker.....I am new to arduino plzzzzz help with the code and connections like the value of resistor that I should use with the speaker