The condition at line 41 is never true. Since i is set to 1 at line 38 and incremented at line 48, it's never zero.
Then the loop at line 50 is infinite because j is never changed. As a result, the program prints "File opened successfully" and then just sits there doing nothing.
As an aside, what's going on at lines 24-32? Counter and frame are always zero so these lines have no effect.
Thanks for your help I fixed what you said but I'm still getting problems. Lines the outputs at lines 43 & 44 are blank when printed to the screen. Also the max at line 69 displays a wrong value (it seems like a combination of the amplitudes).
Probably more errors with the logic. Here's what I got now:
You only ever read a single number from audioFile (at line 16). Does the file contain more than one number?
Should lines 24-34 be in a loop? Right now they are not.
Because lines 24-34 are not in a loop, counter is 0 the one time that line 24 executes, so the expression is false and amplitude is never updated. As a result amplitude is completely uninitialized.
You never open outFile, so lines 45&46 will never output anything.
I suggest you work on the code that reads the input. Add some temporary code to print out what you read. Make sure that's working correctly before moving on to the processing after line 25.