Tech Kaizen

passion + usefulness = success .. change is the only constant in life

Search this Blog:

Showing posts with label PORTING. Show all posts
Showing posts with label PORTING. Show all posts

Cross Platform Audio(sound) Libraries ..

Cross Platform Audio(sound) libraries:
  1. PortAudio
  2. RtAudio
  3. JUCE
  4. libsoundio
  5. SDL
  6. OpenSL
  7. OpenMAX
PortAudio - PortAudio is a free, cross-platform, open-source, audio I/O library.  It lets you write simple audio programs in 'C' or C++ that will compile and run on many platforms including Windows, Macintosh OS X, and Unix (OSS/ALSA). It is intended to promote the exchange of audio software between developers on different platforms. Many applications use PortAudio for Audio I/O.

RtAudio - RtAudio is a set of C++ classes that provide a common API (Application Programming Interface) for realtime audio input/output across Linux, Macintosh OS-X and Windows operating systems. RtAudio significantly simplifies the process of interacting with computer audio hardware.

JUCE - JUCE (Jules' Utility Class Extensions) is an all-encompassing C++ framework for developing cross-platform software. It contains pretty much everything you're likely to need to create most applications, and is particularly well-suited for building highly-customised GUIs, and for handling graphics and sound. JUCE officially supports Windows, Mac OS X, Linux, iOS, and Android.

libsoundio - libsoundio is a lightweight abstraction over various sound drivers. It provides a well-documented API that operates consistently regardless of the sound driver it connects to. It performs no buffering or processing on your behalf; instead exposing the raw power of the underlying backend. libsoundio is appropriate for games, music players, digital audio workstations, and various utilities.

SDL - Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D. It is used by video playback software, emulators, and popular games including Valve's award winning catalog and many Humble Bundle games. SDL officially supports Windows, Mac OS X, Linux, iOS, and Android. Support for other platforms may be found in the source code.

Festival - library(&Edinburgh Speech Tools library) is a C++ Text to Voice generation library.

OpenMAX DL - OpenMAX DL (Development Layer) APIs contains a comprehensive set of audio, video and imaging functions that can be implemented and optimized on new CPUs, hardware engines, and DSPs and then used for a wide range of accelerated codec functionality such as MPEG-4, H.264, MP3, AAC and JPEG.

OpenSL ES - A royalty-free, cross-platform, hardware-accelerated audio API tuned for embedded systems. It provides a standardized, high-performance, low-latency method to access audio functionality for developers of native applications on embedded mobile multimedia devices, enabling straightforward cross-platform deployment of hardware and software audio capabilities, reducing implementation effort, and promoting the market for advanced audio.


OpenMAX vs OpenSL

OpenSL and OpenMAX are intended for slightly different uses, but have an overlap of functionality. OpenSL is intended for complex audio systems while OpenMAX is intended for general multi-media systems. Either can be used separately, or if needed both can be used - in the overlapping area the functionality is the same (even though the function calls are distinct). From the OpenSL ES and OpenMAX Al specifications this is shown by the following figure: 





Posted by Krishna Kishore Koney
Labels: IMAGE PROCESSING, MOBILE APPLICATION DEVELOPMENT, PORTING

64-bit data models



The 64-bit architecture has the following advantages:
  • A 64-bit application can directly access 4 exabytes( 1 exabyte = 1018 bytes (or)  260 bytes ) of virtual memory, and the Intel Itanium processor provides a contiguous linear address space.
  • 64-bit Linux allows for file sizes up to 4 exabytes, a very significant advantage to servers accessing large databases.


32-bit and 64-bit data models
ILP32LP64LLP64ILP64
char8888
short16161616
int32323264
long32643264
long long64646464
pointer32646464
Note:
The disadvantage of the LP64 model is that storing a long into an int may overflow. On the other hand, casting a pointer to a long will work. In the LLP model, the reverse is true.

The difference among the three 64-bit models (LP64, LLP64, and ILP64) lies in the non-pointer data types. When the width of one or more of the C data types changes from one model to another, applications may be affected in various ways. These effects fall into two main categories:

  • Size of data objects. The compilers align data types on a natural boundary; in other words, 32-bit data types are aligned on a 32-bit boundary on 64-bit systems, and 64-bit data types are aligned on a 64-bit boundary on 64-bit systems. This means that the size of data objects such as a structure or a union will be different on 32-bit and 64-bit systems.
  • Size of fundamental data types. Common assumptions about the relationships between the fundamental data types may no longer be valid in a 64-bit data model. Applications that depend on those relationships will fail when compiled on a 64-bit platform. For example, the assumption sizeof (int) = sizeof (long) = sizeof (pointer) is valid for the ILP32 data model, but not valid for others.

Sample Operating Systems:

Microsoft Win64 (X64/IA64) => LLP64

Most Unix and Unix-like systems (Solaris, Linux, HP-UX Itanium , etc.) => LP64

Fujitsu-owned HAL Computer Systems => ILP64


Endianism
Endianism refers to the way in which data is stored, and defines how bytes are addressed in integral and floating point data types.
Little-endian means that the least significant byte is stored at the lowest memory address and the most significant byte is stored at the highest memory address.
Big-endian means that the most significant byte is stored at the lowest memory address and the least significant byte is stored at the highest memory address.
Table 3 shows a sample layout of a 64-bit long integer.

Table 3. Layout of a 64-bit long int

Low addressHigh address
Little endianByte 0Byte 1Byte 2Byte 3Byte 4Byte 5Byte 6Byte 7
Big endianByte 7Byte 6Byte 5Byte 4Byte 3Byte 2Byte 1Byte 0


For example, the 32-bit word 0x12345678 will be laid out on a big endian machine as follows:

Table 4. 0x12345678 on a big-endian system

Memory offset0123
Memory content0x120x340x560x78


If we view 0x12345678 as two half words, 0x1234 and 0x5678, we would see the following in a big endian machine:

Table 5. 0x12345678 as two half words on a big-endian system

Memory offset02
Memory content0x12340x5678


However, on a little endian machine, the word 0x12345678 will be laid out as follows:

Table 6. 0x12345678 on a little-endian system

Memory offset0123
Memory content0x780x560x340x12


Similarly, the two half-words 0x1234 and 0x5678 would look like the following:

Table 7. 0x12345678 as two half words on a little-endian system

Memory offset02
Memory content0x56780x1234


The following example illustrates the difference in byte order between big endian and little endian machines.
The C program below will print out "Big endian" when compiled and run on a big endian machine, and "Little endian" when compiled and run on a little endian machine.

Listing 2. Big endian vs. little endian

#include 
main () {
int i = 0x12345678;
if (*(char *)&i == 0x12)
printf ("Big endian\n");
else if (*(char *)&i == 0x78)
      printf ("Little endian\n");
}


ref:
Porting Linux Applications to 64bit - http://www.ibm.com/developerworks/library/l-port64/index.html

Migrating to Solaris 64-bit: 32-bit Applications and Data Model - http://developers.sun.com/solaris/articles/solarisupgrade/64bit/Convert.html

Converting 32-bit Applications Into 64-bit Applications: Things to Consider - http://developers.sun.com/solaris/articles/ILP32toLP64Issues.html


Posted by Krishna Kishore Koney
Labels: PORTING

64bit Windows Operating System Overview


The performance benefits seen from the x64 OS have been substantial. Because of the larger virtual memory space available to the processes. There are 232 possible combinations that a 32-bit address can take (meaning 4GB worth of addressable space). On the x86 operating system, half of that is allocated for the kernel, and the other half is given to user mode processes. Since the addressing spaces of the user mode processes are independent of each other, each process can reference up to 2GB of memory. With a 64-bit addressing space, there is a possibility of 264 unique address combinations (16 exabytes). The x64 OS currently uses 43 bits for addressing, giving the kernel 8TB of addressable memory, and leaving the other 8TB for user mode processes.

WOW64 Layer

WOW64 is the x86 emulator that allows 32-bit Windows-based applications to run on 64-bit Windows.WOW64 launches and runs 32-bit applications seamlessly. The system isolates 32-bit applications from 64-bit applications, which includes preventing file and registry collisions. Console, GUI, and service applications are supported. However, 32-bit processes cannot load 64-bit DLLs, and 64-bit processes cannot load 32-bit DLLs.

Restrictions of the WOW64 subsystem
The WOW64 subsystem does not support the following programs:
• Programs that are compiled for 16-bit operating systems
• Kernel-mode programs that are compiled for 32-bit operating systems

16-bit programs
The x64-based versions of Windows Server 2003 and of Windows XP Professional x64 Edition do not support 16-bit programs or 16-bit program components. The software emulation that is required to run 16-bit programs on the x64-based version of Windows Server 2003 or of Windows XP Professional x64 Edition would significantly decrease the performance of those programs.

If a 32-bit program that requires 16-bit components tries to run a 16-bit file or component, the 32-bit program will log an error message in the System log. The operating system will then let the 32-bit program handle the error.

If there are any 32bit Applications that make use of 16bit binaries (.exe/.dll) and these 16bit binaries (.exe/.dll) need to be copied to the Win64 machine during Migration Process then these applications may stop working on the Win64 machine.

32-bit drivers
The x64-based versions of Windows Server 2003 and of Windows XP Professional x64 Edition do not support 32-bit drivers. All hardware device drivers and program drivers must be compiled specifically for the x64-based version of Windows Server 2003 and of Windows XP Professional x64 Edition.

If a 32-bit program tries to register a 32-bit driver for automatic startup on a computer that is running an x64-based version of Windows Server 2003 or of Windows XP Professional x64 Edition, the bootstrap loader on the computer recognizes that the 32-bit driver is not supported. The x64-based version of Windows Server 2003 or of Windows XP Professional x64 Edition does not start the 32-bit driver, but does start the other registered drivers.

If there are any 64bit Applications that make use of 32/16bit Device Drivers and these 16bit binaries (.exe/.dll) need to be copied to the Win64 machine during migration Process then these applications may stop working on the Win64 machine.

File System Redirection
When a Windows API function to detect the operating system on which you are running, the File System Redirection function maps your 32- or 64-bit files to the appropriate system directory. Any time a 32-bit process attempts to access c:\windows\system32 the WoW64 layer redirects it into c:\windows\syswow64 which contains all of the 32-bit Windows binaries. This prevents a 32-bit process from trying to load a 64-bit binary. Any scripts or tools running in a 32-bit process that is referencing this directory will be automatically redirected to the syswow64 directory.

A new C:\Program Files directory is introduced with 64-bit Windows. The familiar Program Files directory is now reserved for native 64-bit applications. Your 32-bit applications are directed to the new C:\Program Files (x86) directory.

Registry Redirection
Any 32-bit process trying to read or write to HKEY_LOCAL_MACHINE\Software\ gets redirected to HKEY_LOCAL_MACHINE\Software\Wow6432Node\. This allows separate configurations to be maintained for 32-bit and 64-bit processes. Any custom settings or keys set in this node may need to exist in both keys, as 32-bit processes will be redirected to this new branch.


Links
http://msdn.microsoft.com/msdnmag/issues/06/05/x64/default.aspx http://www.acucorp.com/company/newsletter/newsletter_featured/featured_6.php http://msdn.microsoft.com/chats/transcripts/windows/windows_110904b.aspx

Posted by Krishna Kishore Koney
Labels: PORTING

C/C++ : Guidelines - Porting to 64bit Operating Systems

Guidelines to remember while porting C/C++ Applications to 64-bit mode

• Data Truncation
• Avoid assigning longs to ints
• Avoid Storing Pointers in ints
• Avoid Truncating Function Return Values
• Use Appropriate Print Specifiers

• Data Type Promotion
• Avoid Arithmetic between Signed and Unsigned Numbers

• Pointers
• Avoid Pointer Arithmetic between longs and ints
• Avoid Casting Pointers to ints or ints to Pointers
• Avoid Storing Pointers in ints
• Avoid Truncating Function Return Values

• Structures
• Avoid Using Unnamed and Unqualified Bit Fields
• Avoid Passing Invalid Structure References

• Hardcoded Constants
• Avoid Using Literals and Masks that Assume 32 bits
• Avoid Hardcoding Size of Data Types
• Avoid Hardcoding Bit Shift Values
• Avoid Hardcoding Constants with malloc(), memory(3), string(3)


Ref:
Migrating to 64-Bit Environments - http://www.informit.com/guides/printerfriendly.asp?g=cplusplus&seqNum=201

Porting to a 64-bit Platform - http://www.devx.com/Intel/Article/27237/2217?pf=true

HP-UX 64-bit Porting Concepts - http://docs.hp.com/en/5966-9844/ch03.html

HP-UX 64-bit Porting and Transition Guide: HP 9000 Computers - http://docs.hp.com/en/5966-9887/

Target 32- and 64-bit Platforms Together with a Few Simple Datatype Changes -http://www.devx.com/cplus/Article/27510/1954?pf=true

Posted by Krishna Kishore Koney
Labels: PORTING
Home
Subscribe to: Posts (Atom)

The Verge - YOUTUBE

Loading...

Microsoft Research

Loading...

Hugging Face - Blog

Loading...

AI at Wharton

Loading...

Stanford Online

Loading...

MIT OpenCourseWare - YOUTUBE

Loading...

NPTEL IISC BANGALORE - YOUTUBE

Loading...

HackerRank - YOUTUBE

Loading...

FREE CODE CAMP - YOUTUBE

Loading...

BYTE BYTE GO - YOUTBUE

Loading...

GAURAV SEN INTERVIEWS - YOUTUBE

Loading...

Tanay Pratap - YOUTUBE

Loading...

Ashish Pratap Singh - YOUTUBE

Loading...

Kantan Coding - YOUTUBE

Loading...

SUCCESS IN TECH INTERVIEWS - YOUTUBE

Loading...

IGotAnOffer: Engineering - YOUTUBE

Loading...

DEEPLEARNING AI - YOUTUBE

Loading...

MIT News - Artificial intelligence

Loading...
My photo
Krishna Kishore Koney
View my complete profile
" It is not the strongest of the species that survives nor the most intelligent that survives, It is the one that is the most adaptable to change "

View krishna kishore koney's profile on LinkedIn


Failure is not falling down, it is not getting up again. Success is the ability to go from failure to failure without losing your enthusiasm.

Where there's a Will, there's a Way. Keep on doing what fear you, that is the quickest and surest way to to conquer it.

Vision is the art of seeing what is invisible to others. For success, attitude is equally as important as ability.

Monthly Blog Archives

  • ▼  2026 (5)
    • ▼  May (1)
      • Open-source AI agent frameworks
    • ►  April (1)
    • ►  March (3)
  • ►  2025 (4)
    • ►  October (1)
    • ►  August (1)
    • ►  May (1)
    • ►  April (1)
  • ►  2024 (18)
    • ►  December (1)
    • ►  October (2)
    • ►  September (5)
    • ►  August (10)
  • ►  2022 (2)
    • ►  December (2)
  • ►  2021 (2)
    • ►  April (2)
  • ►  2020 (18)
    • ►  November (1)
    • ►  September (8)
    • ►  August (1)
    • ►  June (8)
  • ►  2019 (18)
    • ►  December (1)
    • ►  November (2)
    • ►  September (3)
    • ►  May (8)
    • ►  February (1)
    • ►  January (3)
  • ►  2018 (3)
    • ►  November (1)
    • ►  October (1)
    • ►  January (1)
  • ►  2017 (2)
    • ►  November (1)
    • ►  March (1)
  • ►  2016 (5)
    • ►  December (1)
    • ►  April (3)
    • ►  February (1)
  • ►  2015 (15)
    • ►  December (1)
    • ►  October (1)
    • ►  August (2)
    • ►  July (4)
    • ►  June (2)
    • ►  May (3)
    • ►  January (2)
  • ►  2014 (13)
    • ►  December (1)
    • ►  November (2)
    • ►  October (4)
    • ►  August (5)
    • ►  January (1)
  • ►  2013 (5)
    • ►  September (2)
    • ►  May (1)
    • ►  February (1)
    • ►  January (1)
  • ►  2012 (19)
    • ►  November (1)
    • ►  October (2)
    • ►  September (1)
    • ►  July (1)
    • ►  June (6)
    • ►  May (1)
    • ►  April (2)
    • ►  February (3)
    • ►  January (2)
  • ►  2011 (20)
    • ►  December (5)
    • ►  August (2)
    • ►  June (6)
    • ►  May (4)
    • ►  April (2)
    • ►  January (1)
  • ►  2010 (41)
    • ►  December (2)
    • ►  November (1)
    • ►  September (5)
    • ►  August (2)
    • ►  July (1)
    • ►  June (1)
    • ►  May (8)
    • ►  April (2)
    • ►  March (3)
    • ►  February (5)
    • ►  January (11)
  • ►  2009 (113)
    • ►  December (2)
    • ►  November (5)
    • ►  October (11)
    • ►  September (1)
    • ►  August (14)
    • ►  July (5)
    • ►  June (10)
    • ►  May (4)
    • ►  April (7)
    • ►  March (11)
    • ►  February (15)
    • ►  January (28)
  • ►  2008 (61)
    • ►  December (7)
    • ►  September (6)
    • ►  August (1)
    • ►  July (17)
    • ►  June (6)
    • ►  May (24)
  • ►  2006 (7)
    • ►  October (7)

Blog Archives Categories

  • .NET DEVELOPMENT (38)
  • 5G (5)
  • AI (Artificial Intelligence) (16)
  • AI/ML (10)
  • ANDROID DEVELOPMENT (7)
  • BIG DATA ANALYTICS (6)
  • C PROGRAMMING (7)
  • C++ PROGRAMMING (24)
  • CAREER MANAGEMENT (6)
  • CHROME DEVELOPMENT (2)
  • CLOUD COMPUTING (46)
  • CODE REVIEWS (3)
  • CYBERSECURITY (12)
  • DATA SCIENCE (4)
  • DATABASE (14)
  • DESIGN PATTERNS (9)
  • DEVICE DRIVERS (5)
  • DOMAIN KNOWLEDGE (14)
  • EDGE COMPUTING (4)
  • EMBEDDED SYSTEMS (9)
  • ENTERPRISE ARCHITECTURE (10)
  • IMAGE PROCESSING (3)
  • INTERNET OF THINGS (2)
  • J2EE PROGRAMMING (10)
  • KERNEL DEVELOPMENT (6)
  • KUBERNETES (20)
  • LATEST TECHNOLOGY (23)
  • LINUX (9)
  • MAC OPERATING SYSTEM (2)
  • MOBILE APPLICATION DEVELOPMENT (14)
  • PORTING (4)
  • PYTHON PROGRAMMING (6)
  • RESEARCH AND DEVELOPMENT (1)
  • SCRIPTING LANGUAGES (8)
  • SERVICE ORIENTED ARCHITECTURE (SOA) (10)
  • SOFTWARE DESIGN (13)
  • SOFTWARE QUALITY (5)
  • SOFTWARE SECURITY (24)
  • SYSTEM and NETWORK ADMINISTRATION (3)
  • SYSTEM PROGRAMMING (4)
  • TECHNICAL MISCELLANEOUS (32)
  • TECHNOLOGY INTEGRATION (5)
  • TEST AUTOMATION (5)
  • UNIX OPERATING SYSTEM (4)
  • VC++ PROGRAMMING (44)
  • VIRTUALIZATION (8)
  • WEB PROGRAMMING (8)
  • WINDOWS OPERATING SYSTEM (13)
  • WIRELESS DEVELOPMENT (5)
  • XML (3)

Popular Posts

  • Windows User-Mode Driver Framework (UMDF) ..
  • Open-source AI agent frameworks
  • Windows FileSystem Mini Filter Driver Development
  • Service Discovery Protocols

My Other Blogs

  • Career Management: Invest in Yourself
  • A la carte: Color your Career
  • Attitude is everything(in Telugu language)
WINNING vs LOSING

Hanging on, persevering, WINNING
Letting go, giving up easily, LOSING

Accepting responsibility for your actions, WINNING
Always having an excuse for your actions, LOSING

Taking the initiative, WINNING
Waiting to be told what to do, LOSING

Knowing what you want and setting goals to achieve it, WINNING
Wishing for things, but taking no action, LOSING

Seeing the big picture, and setting your goals accordingly, WINNING
Seeing only where you are today, LOSING

Being determined, unwilling to give up WINNING
Gives up easily, LOSING

Having focus, staying on track, WINNING
Allowing minor distractions to side track them, LOSING

Having a positive attitude, WINNING
having a "poor me" attitude, LOSING

Adopt a WINNING attitude!

Total Pageviews

Who am I

My photo
Krishna Kishore Koney

Blogging is about ideas, self-discovery, and growth. This is a small effort to grow outside my comfort zone.

Most important , A Special Thanks to my parents(Sri Ramachandra Rao & Srimathi Nagamani), my wife(Roja), my lovely daughter (Hansini) and son (Harshil) for their inspiration and continuous support in developing this Blog.

... "Things will never be the same again. An old dream is dead and a new one is being born, as a flower that pushes through the solid earth. A new vision is coming into being and a greater consciousness is being unfolded" ... from Jiddu Krishnamurti's Teachings.

Now on disclaimer :
1. Please note that my blog posts reflect my perception of the subject matter and do not reflect the perception of my Employer.

2. Most of the times the content of the blog post is aggregated from Internet articles and other blogs which inspired me. Due respect is given by mentioning the referenced URLs below each post.

Have a great time

My LinkedIn Profile
View my complete profile

Aryaka Insights

Loading...

Reid Hoffman - YOUTUBE

Loading...

Martin Fowler's Bliki - BLOG

Loading...

The Pragmatic Engineer

Loading...

AI Workshop

Loading...

CYBER SECURITY - YOUTUBE

Loading...

CYBER SECURITY FUNDAMENTALS PROF MESSER - YOUTUBE

Loading...