Advanced Micro Devices Inc forecast lower quarterly revenue as a shortage of hard drives and a shaky economy hurt PC makers, sending its shares lower in after-hours trading.

The PC chipmaker's fourth-quarter adjusted earnings beat expectations, but revenue for the quarter just ended and revenue projections for the current quarter came in a bit below many analysts' expectations.

Like larger rival Intel Corp, AMD has been wrestling with slow demand for chips as consumers increasingly buy Apple Inc's iPad instead of laptops.

Also hurting sales of processors, PC manufacturers have been struggling to obtain enough hard drives to meet production targets after flooding last year ruined factories and sensitive machinery in Thailand, the world's No. 2 exporter of the components.

Intel beat scaled-back quarterly earnings expectations last week after warning that the hard drive shortage was hurting PC production. It also warned of lower revenue in the current quarter.

AMD depends more on sales of PC processors for its revenue than does Intel, which sells proportionally more chips for servers. It grew its PC chip revenue 2 percent sequentially in the fourth quarter, while Intel's PC chip business dipped slightly during the same period.

They did slightly better than Intel in Q4 in their PC business but they have to show that consistently over a few quarters for investors to give them credit, said CLSA analyst Srini Pajjuri.

Chief Executive Rory Reid said AMD has corrected a problem with the production of its 45 nanometer chips that hurt output in recent quarters and expects a rebound in production in the current quarter.

Also on Tuesday, programmable chipmaker Altera posted quarterly results above analysts' estimates but its weak first-quarter outlook sent shares down 3 percent after the bell.

With PC sales suffering, AMD and Intel have failed to find a foothold in smartphones and tablets, where processors based on ARM Holdings' power-efficient chip designs are widely used.

Apple became the largest buyer of semiconductors last year, overtaking Samsung Electronics and Hewlett-Packard Co as sales of iPads and iPhones outpaced PCs and other consumer gadgets, according to market research firm Gartner.

Dogged by concerns the PC chipmaker is being left behind in the fast-growing mobile market, shares of AMD have fallen about 13 percent over the past year.

AMD said revenue in the fourth quarter rose 2 percent from the year-ago period, to $1.69 billion.

But it said revenue in the quarter ending in March would fall 8 percent from the previous quarter, plus or minus 3 percentage points, to around $1.504 billion to $1.606 billion.

Analysts on average expected fourth-quarter revenue of $1.716 billion and March-quarter revenue of $1.595 billion, according to Thomson Reuters I/B/E/S.

Non-GAAP earnings in the quarter were $138 million, compared with $106 million in the year-ago period. Non-GAAP earnings per share were 19 cents, compared with 14 cents in the year-ago quarter. Analysts on average expected earnings per share of 16 cents.

AMD shares were down 2.7 percent at $6.35 in extended trading after closing up 0.15 percent at $6.53.

(Reporting by Noel Randewich in San Francisco; Editing by Steve Orlofsky, Matthew Lewis and Andre Grenon)