I see
- beginRecord(pg);
Seems to me that the Pausing While Recording example is exactly what I was looking for from the start, many thanks!