0.?.? (to be announced) "neural discharge"
------------------------------------------
+The main change in this release is the major audio format handler
+cleanup which removes some similar/duplicate code and makes it easier
+to implement plugins for other audio formats. Of course, the usual mix
+of other improvements/changes/bugfixes also made it into the release.
+
+ - simplified audio format handlers (some of the handling functions
+ were moved one layer up to the virtual streaming system).
+ - repositioning of mp3 streams is much faster, in particular for
+ - jumping near the end of large mp3 files.
- permission flags DB_READ,DB_WRITE have been renamed to AFS_READ
and AFS_WRITE.
- fix a bug in para_filter that caused decoding of aac files
return 1;
}
-/*
- * nothing to do as we'll seek to the correct offset in aac read_chunk() anyway
- */
-static int aac_reposition_stream(__a_unused long unsigned request)
-{
- return 1;
-}
-
static char *aac_read_chunk(long unsigned current_chunk, ssize_t *len)
{
int ret;
void aac_afh_init(struct audio_format_handler *p)
{
af = p;
- af->reposition_stream = aac_reposition_stream;
af->get_file_info = aac_get_file_info,
af->read_chunk = aac_read_chunk;
af->close_audio_file = aac_close_audio_file;
* for closing the file handle. It is assumed to succeed.
*/
void (*close_audio_file)(void);
- /**
- * jump to another position in the current audio file
- *
- * This is called if a client issued the ff or jmp command with \a request
- * being the number of the next chunk that should be sent out. Must return a
- * positive value on success and a negative value on errors.
- */
- int (*reposition_stream)(long unsigned request);
/**
* function responsible for reading one data chunk.
*
return 1;
}
-static int mp3_reposition_stream(__a_unused long unsigned new_frame)
-{
- return 1;
-}
-
static char *mp3_read_chunk(long unsigned current_chunk, ssize_t *len)
{
int ret;
{
af = p;
af->get_file_info = mp3_get_file_info;
- af->reposition_stream = mp3_reposition_stream;
af->read_chunk = mp3_read_chunk;
af->close_audio_file = mp3_close_audio_file;
af->get_header_info = NULL;
return ret;
}
-static int ogg_reposition_stream(__a_unused long unsigned new_frame)
-{
- return 1;
-}
-
static char *ogg_read_chunk(long unsigned current_chunk, ssize_t *len)
{
int ret;
void ogg_init(struct audio_format_handler *p)
{
af = p;
- af->reposition_stream = ogg_reposition_stream;
af->get_file_info = ogg_get_file_info,
af->read_chunk = ogg_read_chunk;
af->close_audio_file = ogg_close_audio_file;
}
mmd->chunks_sent = 0;
}
- if (af && vss_repos() && mmd->current_chunk != mmd->repos_request)
- af->reposition_stream(mmd->repos_request);
if (vss_repos()) {
mmd->new_vss_status_flags &= ~(VSS_REPOS);
mmd->current_chunk = mmd->repos_request;