44 lines
1.4 KiB
C
44 lines
1.4 KiB
C
|
/***************************************************************************
|
||
|
* __________ __ ___.
|
||
|
* 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>
|
||
|
|
||
|
#include "system.h"
|
||
|
#include "metadata.h"
|
||
|
#include "metadata_common.h"
|
||
|
#include "metadata_parsers.h"
|
||
|
#include "logf.h"
|
||
|
|
||
|
bool get_vox_metadata(int fd, struct mp3entry* id3)
|
||
|
{
|
||
|
/* vox is headerless format */
|
||
|
|
||
|
id3->frequency = 8000;
|
||
|
id3->vbr = false; /* All VOX files are CBR */
|
||
|
id3->filesize = filesize(fd);
|
||
|
id3->length = ((int64_t) id3->filesize * 2000) / id3->frequency;
|
||
|
|
||
|
return true;
|
||
|
}
|