diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2013-05-31 02:41:02 -0400 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2013-05-31 03:20:35 -0400 |
commit | 5857c44017a1641fce7f00da7f16c143daacbaf6 (patch) | |
tree | b8a7ff134977ee8dd6b25b5591f4eb81172f74ab /apps/playback.h | |
parent | df6e1bcce5071e02b5cd46736bff87ca0dcceffe (diff) | |
download | rockbox-5857c44017a1641fce7f00da7f16c143daacbaf6.tar.gz rockbox-5857c44017a1641fce7f00da7f16c143daacbaf6.zip |
Refactor audio thread to run both recording and playback.
Eliminates the pcmrec thread and keeps playback and recording engine
operation mutually-exclusive.
audio_thread.c contains the audio thread which branches to the
correct engine depending upon the request. It also handles the main
audio initialization.
Moves pcm_init into main.c just before dsp_init because I don't want
that one in audio_init in the new file.
(Also makes revision df6e1bc pointless ;)
Change-Id: Ifc1db24404e6d8dd9ac42d9f4dfbc207aa9a26e1
Diffstat (limited to 'apps/playback.h')
-rw-r--r-- | apps/playback.h | 64 |
1 files changed, 1 insertions, 63 deletions
diff --git a/apps/playback.h b/apps/playback.h index 5135c988cb..865e9a313b 100644 --- a/apps/playback.h +++ b/apps/playback.h | |||
@@ -92,68 +92,6 @@ size_t audio_get_filebuflen(void); | |||
92 | otherwise the result is undefined. */ | 92 | otherwise the result is undefined. */ |
93 | bool audio_automatic_skip(void); | 93 | bool audio_automatic_skip(void); |
94 | 94 | ||
95 | /* Define one constant that includes recording related functionality */ | 95 | unsigned int playback_status(void); |
96 | #if defined(HAVE_RECORDING) && !defined(SIMULATOR) | ||
97 | #define AUDIO_HAVE_RECORDING | ||
98 | #endif | ||
99 | |||
100 | enum { | ||
101 | Q_NULL = 0, /* reserved */ | ||
102 | |||
103 | /* -> audio */ | ||
104 | Q_AUDIO_PLAY = 1, | ||
105 | Q_AUDIO_STOP, | ||
106 | Q_AUDIO_PAUSE, | ||
107 | Q_AUDIO_SKIP, | ||
108 | Q_AUDIO_PRE_FF_REWIND, | ||
109 | Q_AUDIO_FF_REWIND, | ||
110 | Q_AUDIO_FLUSH, | ||
111 | Q_AUDIO_DIR_SKIP, | ||
112 | |||
113 | /* pcmbuf -> audio */ | ||
114 | Q_AUDIO_TRACK_CHANGED, | ||
115 | |||
116 | /* audio -> audio */ | ||
117 | Q_AUDIO_FILL_BUFFER, /* continue buffering next track */ | ||
118 | |||
119 | /* buffering -> audio */ | ||
120 | Q_AUDIO_BUFFERING, /* some buffer event */ | ||
121 | Q_AUDIO_FINISH_LOAD_TRACK, /* metadata is buffered */ | ||
122 | Q_AUDIO_HANDLE_FINISHED, /* some other type is buffered */ | ||
123 | |||
124 | /* codec -> audio (*) */ | ||
125 | Q_AUDIO_CODEC_SEEK_COMPLETE, | ||
126 | Q_AUDIO_CODEC_COMPLETE, | ||
127 | |||
128 | /* audio -> codec */ | ||
129 | Q_CODEC_LOAD, | ||
130 | Q_CODEC_RUN, | ||
131 | Q_CODEC_PAUSE, | ||
132 | Q_CODEC_SEEK, | ||
133 | Q_CODEC_STOP, | ||
134 | Q_CODEC_UNLOAD, | ||
135 | |||
136 | |||
137 | /*- miscellanous -*/ | ||
138 | #ifdef AUDIO_HAVE_RECORDING | ||
139 | /* -> codec */ | ||
140 | Q_AUDIO_LOAD_ENCODER, /* load an encoder for recording */ | ||
141 | #endif | ||
142 | /* -> codec */ | ||
143 | Q_CODEC_DO_CALLBACK, | ||
144 | |||
145 | |||
146 | /*- settings -*/ | ||
147 | |||
148 | #ifdef HAVE_DISK_STORAGE | ||
149 | /* -> audio */ | ||
150 | Q_AUDIO_UPDATE_WATERMARK, /* buffering watermark needs updating */ | ||
151 | #endif | ||
152 | /* -> audio */ | ||
153 | Q_AUDIO_REMAKE_AUDIO_BUFFER, /* buffer needs to be reinitialized */ | ||
154 | }; | ||
155 | |||
156 | /* (*) If you change these, you must check audio_clear_track_notifications | ||
157 | in playback.c for correctness */ | ||
158 | 96 | ||
159 | #endif /* _PLAYBACK_H */ | 97 | #endif /* _PLAYBACK_H */ |