Midi: Remove some duplicated code

Introduced new private read/write_midi_settings() and used them
in MidiSettingsView and SoftSynth.
This commit is contained in:
Stefano Ceccherini
2015-08-27 11:51:57 +02:00
parent 281409fdc0
commit d6039d2b23
6 changed files with 116 additions and 47 deletions
+24
View File
@@ -0,0 +1,24 @@
/*
* Copyright 2015 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef MIDI_SETTINGS_PRIVATE_H_
#define MIDI_SETTINGS_PRIVATE_H_
#include <StorageDefs.h>
#include <SupportDefs.h>
namespace BPrivate {
struct midi_settings {
char soundfont_file[B_FILE_NAME_LENGTH];
};
status_t read_midi_settings(struct midi_settings* settings);
status_t write_midi_settings(struct midi_settings settings);
};
#endif /* MIDI_SETTINGS_PRIVATE_H_ */