Output the audio signal with filtering by graphic equalizer in the *.wav file on the SD card using onboard CODEC. SD カードの *.wav ファイルのオーディオ信号をグラフィック・イコライザを通して,ボードに搭載されているCODEC で出力する.
Dependencies: F746_GUI F746_SAI_IO SD_PlayerSkeleton FrequencyResponseDrawer
mbed_src_STM32F7/api/FileSystemLike.h@16:cbb726ac20d8, 2016-10-02 (annotated)
- Committer:
- MikamiUitOpen
- Date:
- Sun Oct 02 06:33:59 2016 +0000
- Revision:
- 16:cbb726ac20d8
17
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
MikamiUitOpen | 16:cbb726ac20d8 | 1 | /* mbed Microcontroller Library |
MikamiUitOpen | 16:cbb726ac20d8 | 2 | * Copyright (c) 2006-2013 ARM Limited |
MikamiUitOpen | 16:cbb726ac20d8 | 3 | * |
MikamiUitOpen | 16:cbb726ac20d8 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
MikamiUitOpen | 16:cbb726ac20d8 | 5 | * you may not use this file except in compliance with the License. |
MikamiUitOpen | 16:cbb726ac20d8 | 6 | * You may obtain a copy of the License at |
MikamiUitOpen | 16:cbb726ac20d8 | 7 | * |
MikamiUitOpen | 16:cbb726ac20d8 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
MikamiUitOpen | 16:cbb726ac20d8 | 9 | * |
MikamiUitOpen | 16:cbb726ac20d8 | 10 | * Unless required by applicable law or agreed to in writing, software |
MikamiUitOpen | 16:cbb726ac20d8 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
MikamiUitOpen | 16:cbb726ac20d8 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
MikamiUitOpen | 16:cbb726ac20d8 | 13 | * See the License for the specific language governing permissions and |
MikamiUitOpen | 16:cbb726ac20d8 | 14 | * limitations under the License. |
MikamiUitOpen | 16:cbb726ac20d8 | 15 | */ |
MikamiUitOpen | 16:cbb726ac20d8 | 16 | #ifndef MBED_FILESYSTEMLIKE_H |
MikamiUitOpen | 16:cbb726ac20d8 | 17 | #define MBED_FILESYSTEMLIKE_H |
MikamiUitOpen | 16:cbb726ac20d8 | 18 | |
MikamiUitOpen | 16:cbb726ac20d8 | 19 | #include "platform.h" |
MikamiUitOpen | 16:cbb726ac20d8 | 20 | |
MikamiUitOpen | 16:cbb726ac20d8 | 21 | #include "FileBase.h" |
MikamiUitOpen | 16:cbb726ac20d8 | 22 | #include "FileHandle.h" |
MikamiUitOpen | 16:cbb726ac20d8 | 23 | #include "DirHandle.h" |
MikamiUitOpen | 16:cbb726ac20d8 | 24 | |
MikamiUitOpen | 16:cbb726ac20d8 | 25 | namespace mbed { |
MikamiUitOpen | 16:cbb726ac20d8 | 26 | |
MikamiUitOpen | 16:cbb726ac20d8 | 27 | /** A filesystem-like object is one that can be used to open files |
MikamiUitOpen | 16:cbb726ac20d8 | 28 | * though it by fopen("/name/filename", mode) |
MikamiUitOpen | 16:cbb726ac20d8 | 29 | * |
MikamiUitOpen | 16:cbb726ac20d8 | 30 | * Implementations must define at least open (the default definitions |
MikamiUitOpen | 16:cbb726ac20d8 | 31 | * of the rest of the functions just return error values). |
MikamiUitOpen | 16:cbb726ac20d8 | 32 | */ |
MikamiUitOpen | 16:cbb726ac20d8 | 33 | class FileSystemLike : public FileBase { |
MikamiUitOpen | 16:cbb726ac20d8 | 34 | |
MikamiUitOpen | 16:cbb726ac20d8 | 35 | public: |
MikamiUitOpen | 16:cbb726ac20d8 | 36 | /** FileSystemLike constructor |
MikamiUitOpen | 16:cbb726ac20d8 | 37 | * |
MikamiUitOpen | 16:cbb726ac20d8 | 38 | * @param name The name to use for the filesystem. |
MikamiUitOpen | 16:cbb726ac20d8 | 39 | */ |
MikamiUitOpen | 16:cbb726ac20d8 | 40 | FileSystemLike(const char *name); |
MikamiUitOpen | 16:cbb726ac20d8 | 41 | |
MikamiUitOpen | 16:cbb726ac20d8 | 42 | virtual ~FileSystemLike(); |
MikamiUitOpen | 16:cbb726ac20d8 | 43 | |
MikamiUitOpen | 16:cbb726ac20d8 | 44 | static DirHandle *opendir(); |
MikamiUitOpen | 16:cbb726ac20d8 | 45 | friend class BaseDirHandle; |
MikamiUitOpen | 16:cbb726ac20d8 | 46 | |
MikamiUitOpen | 16:cbb726ac20d8 | 47 | /** Opens a file from the filesystem |
MikamiUitOpen | 16:cbb726ac20d8 | 48 | * |
MikamiUitOpen | 16:cbb726ac20d8 | 49 | * @param filename The name of the file to open. |
MikamiUitOpen | 16:cbb726ac20d8 | 50 | * @param flags One of O_RDONLY, O_WRONLY, or O_RDWR, OR'd with |
MikamiUitOpen | 16:cbb726ac20d8 | 51 | * zero or more of O_CREAT, O_TRUNC, or O_APPEND. |
MikamiUitOpen | 16:cbb726ac20d8 | 52 | * |
MikamiUitOpen | 16:cbb726ac20d8 | 53 | * @returns |
MikamiUitOpen | 16:cbb726ac20d8 | 54 | * A pointer to a FileHandle object representing the |
MikamiUitOpen | 16:cbb726ac20d8 | 55 | * file on success, or NULL on failure. |
MikamiUitOpen | 16:cbb726ac20d8 | 56 | */ |
MikamiUitOpen | 16:cbb726ac20d8 | 57 | virtual FileHandle *open(const char *filename, int flags) = 0; |
MikamiUitOpen | 16:cbb726ac20d8 | 58 | |
MikamiUitOpen | 16:cbb726ac20d8 | 59 | /** Remove a file from the filesystem. |
MikamiUitOpen | 16:cbb726ac20d8 | 60 | * |
MikamiUitOpen | 16:cbb726ac20d8 | 61 | * @param filename the name of the file to remove. |
MikamiUitOpen | 16:cbb726ac20d8 | 62 | * @param returns 0 on success, -1 on failure. |
MikamiUitOpen | 16:cbb726ac20d8 | 63 | */ |
MikamiUitOpen | 16:cbb726ac20d8 | 64 | virtual int remove(const char *filename) { return -1; }; |
MikamiUitOpen | 16:cbb726ac20d8 | 65 | |
MikamiUitOpen | 16:cbb726ac20d8 | 66 | /** Rename a file in the filesystem. |
MikamiUitOpen | 16:cbb726ac20d8 | 67 | * |
MikamiUitOpen | 16:cbb726ac20d8 | 68 | * @param oldname the name of the file to rename. |
MikamiUitOpen | 16:cbb726ac20d8 | 69 | * @param newname the name to rename it to. |
MikamiUitOpen | 16:cbb726ac20d8 | 70 | * |
MikamiUitOpen | 16:cbb726ac20d8 | 71 | * @returns |
MikamiUitOpen | 16:cbb726ac20d8 | 72 | * 0 on success, |
MikamiUitOpen | 16:cbb726ac20d8 | 73 | * -1 on failure. |
MikamiUitOpen | 16:cbb726ac20d8 | 74 | */ |
MikamiUitOpen | 16:cbb726ac20d8 | 75 | virtual int rename(const char *oldname, const char *newname) { return -1; }; |
MikamiUitOpen | 16:cbb726ac20d8 | 76 | |
MikamiUitOpen | 16:cbb726ac20d8 | 77 | /** Opens a directory in the filesystem and returns a DirHandle |
MikamiUitOpen | 16:cbb726ac20d8 | 78 | * representing the directory stream. |
MikamiUitOpen | 16:cbb726ac20d8 | 79 | * |
MikamiUitOpen | 16:cbb726ac20d8 | 80 | * @param name The name of the directory to open. |
MikamiUitOpen | 16:cbb726ac20d8 | 81 | * |
MikamiUitOpen | 16:cbb726ac20d8 | 82 | * @returns |
MikamiUitOpen | 16:cbb726ac20d8 | 83 | * A DirHandle representing the directory stream, or |
MikamiUitOpen | 16:cbb726ac20d8 | 84 | * NULL on failure. |
MikamiUitOpen | 16:cbb726ac20d8 | 85 | */ |
MikamiUitOpen | 16:cbb726ac20d8 | 86 | virtual DirHandle *opendir(const char *name) { return NULL; }; |
MikamiUitOpen | 16:cbb726ac20d8 | 87 | |
MikamiUitOpen | 16:cbb726ac20d8 | 88 | /** Creates a directory in the filesystem. |
MikamiUitOpen | 16:cbb726ac20d8 | 89 | * |
MikamiUitOpen | 16:cbb726ac20d8 | 90 | * @param name The name of the directory to create. |
MikamiUitOpen | 16:cbb726ac20d8 | 91 | * @param mode The permissions to create the directory with. |
MikamiUitOpen | 16:cbb726ac20d8 | 92 | * |
MikamiUitOpen | 16:cbb726ac20d8 | 93 | * @returns |
MikamiUitOpen | 16:cbb726ac20d8 | 94 | * 0 on success, |
MikamiUitOpen | 16:cbb726ac20d8 | 95 | * -1 on failure. |
MikamiUitOpen | 16:cbb726ac20d8 | 96 | */ |
MikamiUitOpen | 16:cbb726ac20d8 | 97 | virtual int mkdir(const char *name, mode_t mode) { return -1; } |
MikamiUitOpen | 16:cbb726ac20d8 | 98 | |
MikamiUitOpen | 16:cbb726ac20d8 | 99 | // TODO other filesystem functions (mkdir, rm, rn, ls etc) |
MikamiUitOpen | 16:cbb726ac20d8 | 100 | }; |
MikamiUitOpen | 16:cbb726ac20d8 | 101 | |
MikamiUitOpen | 16:cbb726ac20d8 | 102 | } // namespace mbed |
MikamiUitOpen | 16:cbb726ac20d8 | 103 | |
MikamiUitOpen | 16:cbb726ac20d8 | 104 | #endif |