Freezing of gait (FOG) is a common gait deficit in advanced Parkinson's disease (PD). It is often a cause of falls, interferes with daily activities and significantly impairs quality of life. PD patients can be assisted by auditory cueing. In daily life cueing should be automatic during gait freeze. This paper describes our ambulatory research platform for context-aware online FOG detection and auditory cueing. The system analyzes frequency components of body motion to detect FOG and provides a metronome sound until the patient resumes walking. We characterize the sensitivity and specificity of the system as functions of: sensor placement and orientation, walking style and algorithm parameters. We have performed a study with ten PD patients, which have worn our system performing several walking tasks. Over 8h of data has been recorded and 237 FOG events have been identified by professional physiotherapists in a post-video analysis. The system detected the FOG events online with a sensitivity of 73.1% and a specificity of 81.6%. We show that the theoretical maximum performance of this algorithm with patient specific optimal parameter sets is 88.6% sensitivity and 92.8% specificity. By separating the patients into saccadic and smooth walker with separate feature sets a detection accuracy of 85.9% sensitivity and 90.9% specificity was measured. The vertical axis of the sensor at the knee is the best sensor position and orientation for FOG detection. However the detection performance is relatively insensitive to the location and orientation, showing the robustness of the algorithm.