Skip to content

Instantly share code, notes, and snippets.

View warped-rudi's full-sized avatar

Rüdiger Ihle warped-rudi

  • Ilmenau, Germany
View GitHub Profile
@warped-rudi
warped-rudi / audioengine-fix-24bit-pcm.diff
Created April 10, 2013 10:31
Fix audio engine's float to S24 conversion
diff -aur --unidirectional-new-file a/xbmc/cores/AudioEngine/Utils/AEConvert.cpp b/xbmc/cores/AudioEngine/Utils/AEConvert.cpp
--- a/xbmc/cores/AudioEngine/Utils/AEConvert.cpp 2013-01-28 03:07:32.000000000 +0100
+++ b/xbmc/cores/AudioEngine/Utils/AEConvert.cpp 2013-03-17 13:01:25.000000000 +0100
@@ -837,7 +837,7 @@
_mm_empty();
#else /* no SSE */
for (uint32_t i = 0; i < samples; ++i)
- *dst++ = (safeRound(*data++ * ((float)INT24_MAX+.5f)) & 0xFFFFFF) << 8;
+ *dst++ = safeRound(*data++ * ((float)INT24_MAX+.5f)) & 0x00FFFFFF;
#endif
@warped-rudi
warped-rudi / tda995x_fix_names.diff
Created February 28, 2013 11:27
Forgot to rename variables in 2.1.0 and master
diff --git a/src/lib/adapter/AdapterFactory.cpp b/src/lib/adapter/AdapterFactory.cpp
index dbff5c4..42cdd0b 100644
--- a/src/lib/adapter/AdapterFactory.cpp
+++ b/src/lib/adapter/AdapterFactory.cpp
@@ -100,8 +100,8 @@ int8_t CAdapterFactory::DetectAdapters(cec_adapter_descriptor *deviceList, uint8
if (iAdaptersFound < iBufSize && CTDA995xCECAdapterDetection::FindAdapter() &&
(!strDevicePath || !strcmp(strDevicePath, CEC_TDA995x_VIRTUAL_COM)))
{
- snprintf(deviceList[iAdaptersFound].path, sizeof(deviceList[iAdaptersFound].strComPath), CEC_TDA995x_PATH);
- snprintf(deviceList[iAdaptersFound].comm, sizeof(deviceList[iAdaptersFound].strComName), CEC_TDA995x_VIRTUAL_COM);
@warped-rudi
warped-rudi / Proposal for device detection via libCEC
Created October 22, 2012 07:00
CEC device detection in XBMC Eden (Cubox)
diff --git a/xbmc/peripherals/PeripheralTypes.h b/xbmc/peripherals/PeripheralTypes.h
index 53831fc..94baaf9 100644
--- a/xbmc/peripherals/PeripheralTypes.h
+++ b/xbmc/peripherals/PeripheralTypes.h
@@ -35,7 +35,8 @@ namespace PERIPHERALS
{
PERIPHERAL_BUS_UNKNOWN = 0,
PERIPHERAL_BUS_USB,
- PERIPHERAL_BUS_PCI
+ PERIPHERAL_BUS_PCI,