Limit size of sounds

We know that projects with lots of (large) sounds tend to crash ScratchJr. Hopefully reducing the size of the sounds will help to reduce the number of crashes.
This commit is contained in:
chrisgarrity 2017-07-17 11:25:59 -04:00
parent d4a6b2885d
commit 16e4b7ce27
2 changed files with 3 additions and 3 deletions

View file

@ -61,9 +61,9 @@ NSString *canRecord;
NSError *err;
NSDictionary *settings = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithInt: kAudioFormatLinearPCM], AVFormatIDKey,
[NSNumber numberWithFloat: 22050.0], AVSampleRateKey,
[NSNumber numberWithFloat: 16000.0], AVSampleRateKey,
[NSNumber numberWithInt: 1], AVNumberOfChannelsKey,
[NSNumber numberWithInt: 16], AVLinearPCMBitDepthKey,
[NSNumber numberWithInt: 8], AVLinearPCMBitDepthKey,
nil];
recorder = [[ AVAudioRecorder alloc] initWithURL:url settings:settings error:&err];
if (err) {

View file

@ -173,7 +173,7 @@ export default class Record {
if (isRecording) {
Record.stopRecording();
}
}, 60000);
}, 30000);
}
}