admit failure on audio. why did i have no skip in bink open flags?
This commit is contained in:
1 parent
c254c19ca2
commit
18599151b4
4 files changed
+33
-30
No files matched your search
+9
-11
@@ -422,17 +422,15 @@ BOOL InitializeCriticalSectionAndSpinCount(LPCRITICAL_SECTION lpCriticalSection,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef struct _UEFI_WAVEOUT UEFI_WAVEOUT, *HWAVEOUT;
|
extern UINT32 waveOutOpen();
|
||||||
|
extern UINT32 waveOutWrite();
|
||||||
extern UINT32 waveOutOpen(HWAVEOUT* phwo, UINT32 DeviceId, UINT32 SampleRate, UINT16 Channels);
|
extern UINT32 waveOutPause();
|
||||||
extern UINT32 waveOutWrite(HWAVEOUT hwo, void* lpData, UINT32 dwBufferLength);
|
extern UINT32 waveOutRestart();
|
||||||
extern UINT32 waveOutPause(HWAVEOUT hwo);
|
extern UINT32 waveOutSetVolume();
|
||||||
extern UINT32 waveOutRestart(HWAVEOUT hwo);
|
extern UINT32 waveOutPrepareHeader();
|
||||||
extern UINT32 waveOutSetVolume(HWAVEOUT hwo, UINT32 dwVolume);
|
extern UINT32 waveOutUnprepareHeader();
|
||||||
extern UINT32 waveOutPrepareHeader(HWAVEOUT hwo, void* lpWaveHdr, UINT32 dwSize);
|
extern UINT32 waveOutReset();
|
||||||
extern UINT32 waveOutUnprepareHeader(HWAVEOUT hwo, void* lpWaveHdr, UINT32 dwSize);
|
extern UINT32 waveOutClose();
|
||||||
extern UINT32 waveOutReset(HWAVEOUT hwo);
|
|
||||||
extern UINT32 waveOutClose(HWAVEOUT hwo);
|
|
||||||
|
|
||||||
FARPROC GetProcAddress(HMODULE, LPCSTR func) {
|
FARPROC GetProcAddress(HMODULE, LPCSTR func) {
|
||||||
PRINT("Called: GetProcAddress with func: %s\n", func);
|
PRINT("Called: GetProcAddress with func: %s\n", func);
|
||||||
|
|||||||
@@ -401,7 +401,7 @@ EFI_STATUS efi_main(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE* SystemTable) {
|
|||||||
printf("Video file loaded into memory\n");
|
printf("Video file loaded into memory\n");
|
||||||
|
|
||||||
HBINK bink = NULL;
|
HBINK bink = NULL;
|
||||||
bink = pBinkOpen((const char*)video_file, BINKFROMMEMORY | BINKNOSKIP | BINKNOTHREADEDIO);
|
bink = pBinkOpen((const char*)video_file, BINKFROMMEMORY | BINKNOTHREADEDIO);
|
||||||
printf("Opened Bink!\n");
|
printf("Opened Bink!\n");
|
||||||
|
|
||||||
int width = bink->Width, height = bink->Height;
|
int width = bink->Width, height = bink->Height;
|
||||||
@@ -512,6 +512,8 @@ EFI_STATUS efi_main(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE* SystemTable) {
|
|||||||
Free(video_file);
|
Free(video_file);
|
||||||
Free(framebuffer);
|
Free(framebuffer);
|
||||||
|
|
||||||
|
gBS->FreePages((EFI_PHYSICAL_ADDRESS)HeapMemory, Pages);
|
||||||
|
|
||||||
Print(L"Exiting...\n");
|
Print(L"Exiting...\n");
|
||||||
gBS->Stall(2 * 1000 * 1000);
|
gBS->Stall(2 * 1000 * 1000);
|
||||||
gST->RuntimeServices->ResetSystem(EfiResetShutdown, EFI_SUCCESS, 0, NULL);
|
gST->RuntimeServices->ResetSystem(EfiResetShutdown, EFI_SUCCESS, 0, NULL);
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ a ~~microkernel in denial~~ simple bink player.. running under uefi!
|
|||||||
from the outside it looks like wine but less running under uefi instead of linux.
|
from the outside it looks like wine but less running under uefi instead of linux.
|
||||||
i respect the firmware, but i also make it dance.
|
i respect the firmware, but i also make it dance.
|
||||||
|
|
||||||
i shim a subset of win32 calls up to vista (nt 6) and load the proprietary blob (dll).
|
i shim a subset of win32 calls up to nt 6 or so and load the proprietary blob (dll) so it feels at home.
|
||||||
|
|
||||||
## legal?
|
## legal?
|
||||||
|
|
||||||
@@ -45,6 +45,8 @@ the video to play is fatroot/video.bk2
|
|||||||
|
|
||||||
> Bink file handlers are slightly more complicated to write on generic x86, because Bink doesn't handle the threading for you. Drop us an email, and we can send you the default file IO system, and so that you can modify it for your platform.
|
> Bink file handlers are slightly more complicated to write on generic x86, because Bink doesn't handle the threading for you. Drop us an email, and we can send you the default file IO system, and so that you can modify it for your platform.
|
||||||
|
|
||||||
|
except i'm using the windows dll which expects threading to just be there. by some miracle it just works.
|
||||||
|
|
||||||
> We can send you many different source examples for various sound systems (waveOut, SDL, CoreAudio, etc), so that you can get up and running quickly. E-mail us for details.
|
> We can send you many different source examples for various sound systems (waveOut, SDL, CoreAudio, etc), so that you can get up and running quickly. E-mail us for details.
|
||||||
|
|
||||||
except i'm a student with no access to the sdk.
|
except i'm a student with no access to the sdk.
|
||||||
@@ -53,7 +55,7 @@ except i'm a student with no access to the sdk.
|
|||||||
> 2. Add the #define __RADX32__ to your compiler command line.
|
> 2. Add the #define __RADX32__ to your compiler command line.
|
||||||
> 3. Add the BinkX32Imp.c and RADDLL.c files to your project. These are the files that load the BinkX32.dll binary module.
|
> 3. Add the BinkX32Imp.c and RADDLL.c files to your project. These are the files that load the BinkX32.dll binary module.
|
||||||
|
|
||||||
except i only had the windows dll (bink2w64.dll).
|
except i only had the windows dll (bink2w64.dll) and loads of time.
|
||||||
|
|
||||||
## q&a
|
## q&a
|
||||||
|
|
||||||
@@ -63,6 +65,12 @@ A: Science isn't about 'why', it's about 'why not'.
|
|||||||
Q: Why not raw frames?
|
Q: Why not raw frames?
|
||||||
A: Too simple.
|
A: Too simple.
|
||||||
|
|
||||||
|
Q: Why not linux?
|
||||||
|
A: Where's the fun in that?
|
||||||
|
|
||||||
|
Q: Why don't you name this project properly?
|
||||||
|
A: Booze - When Wine isn't strong enough.
|
||||||
|
|
||||||
Q: How did you implement file I/O?
|
Q: How did you implement file I/O?
|
||||||
A: I didn't. I just preload the entire video into memory.
|
A: I didn't. I just preload the entire video into memory.
|
||||||
|
|
||||||
@@ -73,7 +81,4 @@ Q: Can I use this in production?
|
|||||||
A: Define production.
|
A: Define production.
|
||||||
|
|
||||||
Q: Will you add audio?
|
Q: Will you add audio?
|
||||||
A: soon™
|
A: I tried. I failed.
|
||||||
|
|
||||||
Q: When?
|
|
||||||
A: When it's ready.
|
|
||||||
@@ -191,18 +191,16 @@ typedef union _LARGE_INTEGER {
|
|||||||
long long QuadPart;
|
long long QuadPart;
|
||||||
} LARGE_INTEGER;
|
} LARGE_INTEGER;
|
||||||
|
|
||||||
typedef struct _UEFI_WAVEOUT UEFI_WAVEOUT, *HWAVEOUT;
|
UINT32 waveOutOpen() { return 0; }
|
||||||
|
UINT32 waveOutWrite() { return 0; }
|
||||||
UINT32 waveOutOpen(HWAVEOUT* phwo, UINT32 DeviceId, UINT32 SampleRate, UINT16 Channels) { return 0; }
|
UINT32 waveOutPause() { return 0; }
|
||||||
UINT32 waveOutWrite(HWAVEOUT hwo, void* lpData, UINT32 dwBufferLength) { return 0; }
|
UINT32 waveOutRestart() { return 0; }
|
||||||
UINT32 waveOutPause(HWAVEOUT hwo) { return 0; }
|
UINT32 waveOutSetVolume() { return 0; }
|
||||||
UINT32 waveOutRestart(HWAVEOUT hwo) { return 0; }
|
UINT32 waveOutPrepareHeader() { return 0; }
|
||||||
UINT32 waveOutSetVolume(HWAVEOUT hwo, UINT32 dwVolume) { return 0; }
|
UINT32 waveOutUnprepareHeader() { return 0; }
|
||||||
UINT32 waveOutPrepareHeader(HWAVEOUT hwo, void* lpWaveHdr, UINT32 dwSize) { return 0; }
|
UINT32 waveOutGetPosition() { return 0; }
|
||||||
UINT32 waveOutUnprepareHeader(HWAVEOUT hwo, void* lpWaveHdr, UINT32 dwSize) { return 0; }
|
UINT32 waveOutReset() { return 0; }
|
||||||
UINT32 waveOutGetPosition(HWAVEOUT hwo, void* lpInfo, UINT32 dwSize) { return 0; }
|
UINT32 waveOutClose() { return 0; }
|
||||||
UINT32 waveOutReset(HWAVEOUT hwo) { return 0; }
|
|
||||||
UINT32 waveOutClose(HWAVEOUT hwo) { return 0; }
|
|
||||||
|
|
||||||
extern int stricmp(const char *s1, const char *s2);
|
extern int stricmp(const char *s1, const char *s2);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user