1 /*
2  * Copyright (C) 2010 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 //-----------------------------------------------------------------------------
18 // Android general purpose errors
19 //----------------------
20 #define ERROR_SHOULDNT_BE_HERE_S \
21         "Reached an invalid code path in %s"
22 
23 //-----------------------------------------------------------------------------
24 // Android AudioPlayer errors
25 //----------------------
26 #define ERROR_PLAYERSTREAMTYPE_SET_UNKNOWN_TYPE \
27         "Cannot set stream type: unknown or invalid stream type"
28 #define ERROR_PLAYERSTREAMTYPE_REALIZED \
29         "Cannot set stream type: audio player already realized"
30 #define ERROR_PLAYERREALIZE_UNKNOWN_DATASOURCE_LOCATOR \
31         "Cannot realize AudioPlayer: with unknown data source locator"
32 #define ERROR_PLAYERREALIZE_UNEXPECTED_OBJECT_TYPE_D \
33         "Cannot realize AudioPlayer: unexpected object type \%d"
34 #define ERROR_PLAYERDESTROY_UNEXPECTED_OBJECT_TYPE_D \
35         "Cannot destroy AudioPlayer: unexpected object type \%d"
36 #define ERROR_PLAYERSETPLAYSTATE_UNEXPECTED_OBJECT_TYPE_D \
37         "Cannot set AudioPlayer playstate: unexpected object type \%d"
38 #define ERROR_PLAYERSETPLAYSTATE_INVALID_OBJECT_STATE_D \
39         "Cannot set AudioPlayer playstate to %d: Android object in invalid state"
40 #define ERROR_PLAYER_NEW_NULL_TRACK \
41         "Internal error: new AudioTrack shouldn't be NULL"
42 #define ERROR_PLAYER_PREFETCH_d \
43         "Error (%d) encountered while prefetching"
44 
45 //-----------------------------------------------------------------------------
46 // Android AudioRecorder errors
47 //----------------------
48 #define ERROR_RECORDER_SINK_MUST_BE_ANDROIDSIMPLEBUFFERQUEUE \
49         "Cannot create AudioRecorder: data sink must be SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE"
50 #define ERROR_RECORDER_SINK_FORMAT_MUST_BE_PCM \
51         "Cannot create AudioRecorder: data sink must be in PCM format"
52 #define ERROR_RECORDER_SOURCE_MUST_BE_IODEVICE \
53         "Cannot create AudioRecorder: data source must be SL_DATALOCATOR_IODEVICE"
54 #define ERROR_RECORDER_IODEVICE_MUST_BE_AUDIOINPUT \
55         "Cannot create AudioRecorder: data source device type must be SL_IODEVICE_AUDIOINPUT"
56 #define ERROR_RECORDER_INPUT_ID_MUST_BE_DEFAULT \
57         "Cannot create AudioRecorder: data source device ID must be SL_DEFAULTDEVICEID_AUDIOINPUT"
58 #define ERROR_RECORDERPRESET_SET_UNKNOWN_PRESET \
59         "Cannot set recording preset: unknown or invalid preset"
60 #define ERROR_RECORDERPRESET_REALIZED \
61         "Cannot set recording preset: audio recorder already realized"
62 
63 //-----------------------------------------------------------------------------
64 // Android Configuration errors
65 //----------------------
66 #define ERROR_CONFIG_UNKNOWN_KEY \
67         "Configuration error: unknown key"
68 #define ERROR_CONFIG_VALUESIZE_TOO_LOW \
69         "Configuration error: value size too low to store valid value"
70 #define ERROR_CONFIG_NULL_PARAM \
71         "Configuration error: invalid NULL parameter"
72