[2] | 1 | /*
|
---|
| 2 | * This program is free software; you can redistribute it and/or modify
|
---|
| 3 | * it under the terms of the GNU General Public License as published by
|
---|
| 4 | * the Free Software Foundation; either version 2, or (at your option)
|
---|
| 5 | * any later version.
|
---|
| 6 | *
|
---|
| 7 | * This program is distributed in the hope that it will be useful,
|
---|
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 10 | * GNU General Public License for more details.
|
---|
| 11 | *
|
---|
| 12 | * You should have received a copy of the GNU General Public License
|
---|
| 13 | * along with this program; see the file COPYING. If not, write to
|
---|
| 14 | * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
---|
| 15 | */
|
---|
| 16 | /*
|
---|
| 17 | * If you need another license for your project/product (commercial,
|
---|
| 18 | * noncommercial, whatever) contact me at
|
---|
| 19 | *
|
---|
| 20 | * http://www.os2world.com/cdwriting
|
---|
| 21 | * http://www.geocities.com/SiliconValley/Sector/5785/
|
---|
| 22 | *
|
---|
| 23 | */
|
---|
| 24 |
|
---|
| 25 | #ifndef _CWAUDIOINC_H_INCLUDED
|
---|
| 26 | #define _CWAUDIOINC_H_INCLUDED
|
---|
| 27 |
|
---|
| 28 | #include "common.h"
|
---|
| 29 |
|
---|
| 30 | /* Target folder for MM class templates */
|
---|
| 31 | #define MMTEMPLATE_FOLDER_ID "<MMPM2_MMTEMPLATEFOLDER>"
|
---|
| 32 |
|
---|
| 33 | /* Default class titles if name can't be loaded from res dll */
|
---|
| 34 | #define CLSTITLE_DIGITALAUDIO "Digital Audio"
|
---|
| 35 | #define CLSTITLE_MP3 "MP3Audio.MP3"
|
---|
| 36 | #define CLSTITLE_WAV "WAVAudio.WAV"
|
---|
| 37 | #define CLSTITLE_OGG "OGGAudio.OGG"
|
---|
| 38 | #define CLSTITLE_AIF "AIFAudio.AIF"
|
---|
| 39 | #define CLSTITLE_AU "AUAudio.AU"
|
---|
| 40 | #define CLSTITLE_IFF "IFFAudio.IFF"
|
---|
| 41 | #define CLSTITLE_MIDI "MIDI.MID"
|
---|
| 42 | #define CLSTITLE_SNDF "SNDAudio.SND"
|
---|
| 43 | #define CLSTITLE_VOC "VOCAudio.VOC"
|
---|
| 44 | #define CLSTITLE__AU "_AUAudio._AU"
|
---|
| 45 | #define CLSTITLE_AUDIOSTREAM "Audio-Stream"
|
---|
| 46 | #define CLSTITLE_CDTRACK "CD-Track"
|
---|
| 47 | #define CLSTITLE_M3U "M3U-Playlist"
|
---|
| 48 | #define CLSTITLE_FLAC "FLACAudio.FLA"
|
---|
| 49 |
|
---|
| 50 | /* TYPES returned by the classes */
|
---|
| 51 | #define TYPE_DIGITALAUDIO "Digital Audio"
|
---|
| 52 | #define TYPE_MP3 "MP3"
|
---|
| 53 | #define TYPE_OGG "OGGS"
|
---|
| 54 | #define TYPE_WAV "WAV"
|
---|
| 55 | #define TYPE_AIF "AIF"
|
---|
| 56 | #define TYPE_AU "AU"
|
---|
| 57 | #define TYPE_IFF "IFF"
|
---|
| 58 | #define TYPE_MIDI "MIDI"
|
---|
| 59 | #define TYPE_SNDF "SND"
|
---|
| 60 | #define TYPE_VOC "VOC"
|
---|
| 61 | #define TYPE__AU "_AU"
|
---|
| 62 | #define TYPE_AUDIOSTREAM "Audio-Stream"
|
---|
| 63 | #define TYPE_CDTRACK "CD-Track"
|
---|
| 64 | #define TYPE_M3U "M3U"
|
---|
| 65 | #define TYPE_FLAC "FLAC"
|
---|
[4] | 66 | #define TYPE_DIGITALVIDEO "Digital Video"
|
---|
[2] | 67 |
|
---|
| 68 | /* Setup strings for MMAudio (was CWAudio). These strings will
|
---|
| 69 | be removed in the future. Use the MM* instead */
|
---|
| 70 | #define SETUP_AUDIOTRACKNAME "CWAUDIOTRACKNAME"
|
---|
| 71 | #define SETUP_AUDIOARTIST "CWAUDIOARTIST"
|
---|
| 72 | #define SETUP_AUDIOALBUM "CWAUDIOALBUM"
|
---|
| 73 | #define SETUP_AUDIOCOMMENT "CWAUDIOCOMMENT"
|
---|
| 74 | #define SETUP_AUDIOYEAR "CWAUDIOYEAR"
|
---|
| 75 | #define SETUP_AUDIOGENRE "CWAUDIOGENRE"
|
---|
| 76 | #define SETUP_AUDIOPLAYTIME "CWAUDIOPLAYTIME"
|
---|
| 77 | #define SETUP_REFRESH "CWAUDIOREFRESH"
|
---|
| 78 | #define SETUP_COPYTAGTO "CWAUDIOCOPYTAGTO"
|
---|
| 79 |
|
---|
| 80 | #define SETUP_MMAUDIOTRACKNAME "MMAUDIOTRACKNAME"
|
---|
| 81 | #define SETUP_MMAUDIOARTIST "MMAUDIOARTIST"
|
---|
| 82 | #define SETUP_MMAUDIOALBUM "MMAUDIOALBUM"
|
---|
| 83 | #define SETUP_MMAUDIOCOMMENT "MMAUDIOCOMMENT"
|
---|
| 84 | #define SETUP_MMAUDIOYEAR "MMAUDIOYEAR"
|
---|
| 85 | #define SETUP_MMAUDIOGENRE "MMAUDIOGENRE"
|
---|
| 86 | #define SETUP_MMAUDIOPLAYTIME "MMAUDIOPLAYTIME"
|
---|
| 87 | #define SETUP_MMREFRESH "MMREFRESH"
|
---|
| 88 | #define SETUP_MMCOPYTAGTO "MMAUDIOCOPYTAGTO"
|
---|
| 89 | /* For setting volume during playing */
|
---|
| 90 | #define SETUP_MMAUDIOVOLUME "MMAUDIOVOLUME"
|
---|
| 91 | /* Lighttable */
|
---|
| 92 | #define SETUP_MMTHUMBSIZE "MMTHUMBSIZE"
|
---|
| 93 |
|
---|
| 94 | /* Restore keys for audio info from instance data */
|
---|
| 95 | #define KEY_TIME 4001
|
---|
| 96 | #define KEY_CHANNELS 4002
|
---|
| 97 | #define KEY_SAMPLERATE 4003
|
---|
| 98 | #define KEY_BPS 4004
|
---|
| 99 | #define KEY_FILESIZE 4005 /* also used for image files */
|
---|
| 100 | /* #define KEY_TRACKNAME 4006
|
---|
| 101 | #define KEY_ARTIST 4007
|
---|
| 102 | #define KEY_ALBUM 4008
|
---|
| 103 | #define KEY_COMMENT 4009
|
---|
| 104 | #define KEY_YEAR 4010
|
---|
| 105 | #define KEY_GENRE 4011 */
|
---|
| 106 | #define KEY_TIME_MS 4012
|
---|
| 107 | #define KEY_NUM_AUDIO_BYTES 4013
|
---|
| 108 |
|
---|
| 109 | #define TRACKNAME_SETTINGS_PANEL 12
|
---|
| 110 |
|
---|
| 111 | /* Restore keys for image info from instance data */
|
---|
| 112 | #define KEY_WIDTH 4001
|
---|
| 113 | #define KEY_HEIGHT 4002
|
---|
| 114 | #define KEY_DEPTH 4003
|
---|
| 115 |
|
---|
| 116 |
|
---|
| 117 | /* The max length of any new column title */
|
---|
| 118 | #define SIZE_TITLE 30
|
---|
| 119 | #define NUM_AUDIO_FIELDS 11 /* Num of additional details columns */
|
---|
| 120 |
|
---|
| 121 | typedef struct _AUDIODETAILS
|
---|
| 122 | {
|
---|
| 123 | PSZ pszPlayTime;
|
---|
| 124 | PSZ pszBitRate; /* New with 0.2.7 */
|
---|
| 125 | PSZ pszSampleRate;
|
---|
| 126 | PSZ pszChannels;
|
---|
| 127 | PSZ pszBPS;
|
---|
| 128 | PSZ pszName;
|
---|
| 129 | PSZ pszArtist;
|
---|
| 130 | PSZ pszAlbum;
|
---|
| 131 | PSZ pszYear;
|
---|
| 132 | PSZ pszComment;
|
---|
| 133 | PSZ pszGenre;
|
---|
| 134 | }AUDIODETAILS;
|
---|
| 135 | typedef AUDIODETAILS *PAUDIODETAILS;
|
---|
| 136 |
|
---|
| 137 | #define CWAUDIO_VIEW_PLAY ID_MENU_START
|
---|
| 138 |
|
---|
| 139 | /* Parameters for WM_APPTERMINATENOTIFY for controlling playing */
|
---|
| 140 | #define ACKEY_START 1
|
---|
| 141 | #define ACKEY_STOP 2
|
---|
| 142 | #define ACKEY_PAUSE 3
|
---|
| 143 | #define ACKEY_RESUME 4
|
---|
| 144 | #define ACKEY_NEXT 5
|
---|
| 145 | #define ACKEY_VOLUME 6
|
---|
| 146 |
|
---|
| 147 | /* returned by cwmmQueryTrackStatus()*/
|
---|
| 148 | #define TRACK_STATUS_STOPPED 0
|
---|
| 149 | #define TRACK_STATUS_PLAYING 1
|
---|
| 150 | #define TRACK_STATUS_PAUSED 2
|
---|
| 151 |
|
---|
| 152 |
|
---|
| 153 |
|
---|
| 154 | /* MMImage */
|
---|
| 155 | #define NUM_IMAGE_DETAILS_FIELDS 4 /* Num of additional details columns */
|
---|
| 156 |
|
---|
| 157 | char chrWidth[SIZE_TITLE];
|
---|
| 158 | char chrHeight[SIZE_TITLE];
|
---|
| 159 | char chrDepth[SIZE_TITLE];
|
---|
| 160 | char chrFormat[SIZE_TITLE];
|
---|
| 161 |
|
---|
| 162 | typedef struct _IMAGEDETAILS
|
---|
| 163 | {
|
---|
| 164 | ULONG ulWidth;
|
---|
| 165 | ULONG ulHeight;
|
---|
| 166 | ULONG ulDepth;
|
---|
| 167 | PSZ pszFormat;
|
---|
| 168 | }IMAGEDETAILS;
|
---|
| 169 | typedef IMAGEDETAILS *PIMAGEDETAILS;
|
---|
| 170 |
|
---|
| 171 |
|
---|
| 172 | /* The maximum size of returned small bitmaps for lighttable folder. Used if someone tries to get
|
---|
| 173 | a wider BMP. */
|
---|
| 174 | #define MAX_SIZE_SMALLBITMAP 250
|
---|
| 175 |
|
---|
| 176 | /* Thread parameters used when requesting a new small bitmap from the create bitmap thread. */
|
---|
| 177 | typedef struct _CREATEBMPINFO
|
---|
| 178 | {
|
---|
| 179 | WPObject * wpObject;
|
---|
| 180 | PMINIRECORDCORE pmrcToRefresh; /* Object record in container. Will be refreshed to show image instead of icon. */
|
---|
| 181 | HWND hwndCnr; /* Container containing the object. Will be refreshed to show image instead of icon. */
|
---|
| 182 | ULONG ulWidth;
|
---|
| 183 | ULONG ulHeight;
|
---|
| 184 | }CREATEBMPINFO;
|
---|
| 185 | typedef CREATEBMPINFO *PCREATEBMPINFO;
|
---|
| 186 |
|
---|
| 187 | /* Tell create bitmap thread to create a new small bitmap */
|
---|
| 188 | #define ACKEY_CREATE_SMALLBITMAP 0
|
---|
| 189 | /* Tell create bitmap thread to read in the image info so cached image size will be
|
---|
| 190 | updated. */
|
---|
| 191 | #define ACKEY_QUERY_BITMAPINFO 1
|
---|
| 192 |
|
---|
| 193 | /*
|
---|
| 194 | Parameter block given to the play thread when audio objects are started using method
|
---|
| 195 | cwmmPlayTrack().
|
---|
| 196 | */
|
---|
| 197 | typedef struct _OPENPARAMS
|
---|
| 198 | {
|
---|
| 199 | WPObject* wpObject; /* Object being started. */
|
---|
| 200 | HWND hwndCnr; /* Container from which the object is started. */
|
---|
| 201 | ULONG ulReserved1;
|
---|
| 202 | ULONG ulReserved2;
|
---|
| 203 | ULONG ulReserved3;
|
---|
| 204 | //PID pid;
|
---|
| 205 | // SWCNTRL swCtrl;
|
---|
| 206 | USEITEM useItem; /* Tell the WPS the object is in use when playing so inuse emphasis
|
---|
| 207 | is drawn. An OPEN_VIEW item is added to the inuse list. The information
|
---|
| 208 | is in the following VIEWITEM. These two structures are used together! */
|
---|
| 209 | VIEWITEM viewItem; /* Used to register the open view with the WPS. */
|
---|
| 210 | }OPENPARAMS;
|
---|
| 211 |
|
---|
| 212 | typedef struct _MMDATAFILEVIEW
|
---|
| 213 | {
|
---|
| 214 | USEITEM useItem;
|
---|
| 215 | VIEWITEM viewItem;
|
---|
| 216 | WPObject* thisPtr;
|
---|
| 217 | PID pid;
|
---|
| 218 | SWCNTRL swCtrl;
|
---|
| 219 | WPObject* wpObject;
|
---|
| 220 | }MMDATAFILEVIEW;
|
---|
| 221 |
|
---|
| 222 |
|
---|
| 223 | #define DEFAULT_AUDIOSTREAM_SERVER "Icecast-Server:port"
|
---|
| 224 |
|
---|
| 225 | /* Ini key for enabling new image class features on CD */
|
---|
| 226 | #define IMAGECLS_FEATURES_ON_CD_KEY "useNewImgClsFeaturesOnCD"
|
---|
| 227 | /* Ini key to disable extended icon titles for audio files */
|
---|
| 228 | #define MM_NO_EXTENDED_ICONTITLE "mmClsNoExtendedIconTitles"
|
---|
| 229 |
|
---|
| 230 | /* Help panels */
|
---|
| 231 | #define M3UFILE_HELP_PANEL 40
|
---|
| 232 |
|
---|
| 233 | /* Maximum # of startable audio files at the same time. This
|
---|
| 234 | prevents that a user starts a whole folder full of audio objects.
|
---|
| 235 | see CWAudio */
|
---|
| 236 | #define MAX_AUDIOFILE_STARTS 1
|
---|
| 237 |
|
---|
| 238 | /* Default volume for audio file if no entry in INI file. Used only for double click
|
---|
| 239 | starting. */
|
---|
| 240 | #define DEFVOLUME_AUDIO_FILE 70
|
---|
| 241 | #define CLASS_VOLUME_APP "classvolume"
|
---|
| 242 | #define CLASS_VOLUME_KEY "volume"
|
---|
| 243 |
|
---|
[4] | 244 | #define MMVIDEO_GETEXT_RX "videoext.rx"
|
---|
| 245 | #define MMMPG_GETEXT_RX "mpegext.rx"
|
---|
| 246 |
|
---|
[2] | 247 | #endif
|
---|
| 248 |
|
---|
| 249 |
|
---|
| 250 |
|
---|
| 251 |
|
---|
| 252 |
|
---|
| 253 |
|
---|
| 254 |
|
---|
| 255 |
|
---|
| 256 |
|
---|
| 257 |
|
---|