2010-02-28 08:13:30 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* __________ __ ___.
|
|
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
* \/ \/ \/ \/ \/
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
* Copyright (C) 2010 Yoshihisa Uchida
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <ctype.h>
|
|
|
|
#include <inttypes.h>
|
2011-10-30 16:05:04 +00:00
|
|
|
#include "platform.h"
|
2010-02-28 08:13:30 +00:00
|
|
|
|
|
|
|
#include "metadata.h"
|
|
|
|
#include "metadata_common.h"
|
|
|
|
#include "metadata_parsers.h"
|
|
|
|
#include "logf.h"
|
|
|
|
|
|
|
|
bool get_vox_metadata(int fd, struct mp3entry* id3)
|
|
|
|
{
|
2010-03-02 10:59:46 +00:00
|
|
|
/*
|
|
|
|
* vox is headerless format
|
|
|
|
*
|
|
|
|
* frequency: 8000 Hz
|
|
|
|
* channels: mono
|
|
|
|
* bitspersample: 4
|
|
|
|
*/
|
2010-02-28 08:13:30 +00:00
|
|
|
id3->frequency = 8000;
|
2010-03-22 10:02:05 +00:00
|
|
|
id3->bitrate = 8000 * 4 / 1000;
|
2010-03-02 10:59:46 +00:00
|
|
|
id3->vbr = false; /* All VOX files are CBR */
|
|
|
|
id3->filesize = filesize(fd);
|
|
|
|
id3->length = id3->filesize >> 2;
|
2010-02-28 08:13:30 +00:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|